Vous êtes sur le site Web historique de la documentation de 4D. Les documentations sont progressivement déplacées vers developer.4d.com

Accueil

 
4D v19
MID

MID 


 

MID ( value , startFrom {, numChars} ) 
Paramètre Type   Description
value  Texte, RefCell, Expression in Text containing the characters to extract
startFrom  Numérique in Number designating the first character to extract in text
numChars  Numérique in Number of characters to return

The MID function returns the requested number of characters from value starting at the position specified in startFrom. It accepts text data for value and numeric data for startFrom and numChars. It returns text data.

In value, pass the text string containing the characters you want to extract. It can be a string, a formula that returns a string, or a reference to a cell containing a string.

In startFrom, pass a number representing the first character you want to extract in text, with the first character in the text having a value of one (1); if not an integer, the number is truncated. It can be a string, a formula that returns a string, or a reference to a cell containing a string. If startFrom:

  • is greater than the length of value, an empty string (" ") is returned
  • is less than the length of value, but startFrom + numChars exceeds the length of value, the characters up to the end of text are returned.

In numChars, pass the number of characters to return from value; if an integer is not specified, the number is truncated.

Exemple  

MID(B17,5,8)

MID("hello world",7,20) //"world"

 
PROPRIÉTÉS 

Produit : 4D
Thème : Formules 4D View Pro
Nom intl. : MID

 
PAGE CONTENTS 
 
HISTORIQUE 

 
UTILISATION DE L'ARTICLE

4D View Pro ( 4D v19)