StringLen

Rend le nombre de symboles dans la chaîne.

int  StringLen(
   string  string_value      // chaîne
   );

Paramètres

string_value

[in]  La chaîne pour le calcul de la longueur.

La valeur rendue

Le nombre de symboles dans la chaîne sans le zéro terminant.

Example:

void OnStart()
  {
//--- define the test string
   string text="123456789012345";
//--- get the number of symbols in the string
   int str_len=StringLen(text);
//--- display the string and the number of symbols in it in the log
   PrintFormat("The StringLen() function returned the value of %d chars in string: '%s'"str_lentext);
   
   /*
   Result
   The StringLen() function returned the value of 15 chars in string: '123456789012345'
   */
  }

Voir aussi

StringBufferLen, StringTrimLeft, StringTrimRight, StringToCharArray, StringToShortArray