StringLen
Retorna o número de símbolos em uma string.
int StringLen(
string string_value
);
|
Parâmetros
string_value
[in] String para calcular o comprimento.
Valor do Retorno
Exemplo:
void OnStart()
{
//--- definimos a string de teste
string text="123456789012345";
//--- obtemos o número de símbolos na string
int str_len=StringLen(text);
//--- imprimimos no log a string e o número de símbolos nela contidos
PrintFormat("The StringLen() function returned the value of %d chars in string: '%s'", str_len, text);
/*
Resultado
The StringLen() function returned the value of 15 chars in string: '123456789012345'
*/
}
|
Também Veja
StringBufferLen, StringTrimLeft, StringTrimRight, StringToCharArray, StringToShortArray