Questo contenuto non è disponibile nella lingua selezionata.
9.9. String functions
The following are string functions you can use.
9.9.1. isinstr Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
General syntax:
isinstr:long (s1:string, s2:string)
isinstr:long (s1:string, s2:string)
This function returns 1 if string s1 contains string s2, otherwise zero.
9.9.2. strlen Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
General syntax:
strlen:long (str:string)
strlen:long (str:string)
This function returns the number of characters in str.
9.9.3. strtol Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
General syntax:
strtol:long (str:string, base:long)
strtol:long (str:string, base:long)
This function converts the string representation of a number to an integer. The base parameter indicates the number base to assume for the string (e.g. 16 for hex, 8 for octal, 2 for binary).
9.9.4. substr Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
General syntax:
substr:string (str:string, start:long, stop:long)
substr:string (str:string, start:long, stop:long)
This function returns the substring of
str
starting from character position start
and ending at character position stop
.
9.9.5. text_str Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
General syntax:
text_str:string (input:string)
text_str:string (input:string)
This function accepts a string argument. Any ASCII characters in the string that are not printable are replaced by a corresponding escape sequence in the returned string.
9.9.6. text_strn Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
General syntax:
text_strn:string (input:string, len:long, quoted:long)
text_strn:string (input:string, len:long, quoted:long)
This function accepts a string of length
len
. Any ASCII characters that are not printable are replaced by a corresponding escape sequence in the returned string. If quoted
is not null, the function adds a backslash character to the output.
9.9.7. tokenize Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
General syntax:
tokenize:string (input:string, delim:string)
tokenize:string (input:string, delim:string)
This function returns the next non-empty token in the given input string, where the tokens are delimited by characters in the delim string. If the input string is non-NULL, it returns the first token. If the input string is NULL, it returns the next token in the string passed in the previous call to tokenize. If no delimiter is found, the entire remaining input string is returned. It returns NULL when no more tokens are available.