Shiny Language Reference
Language Reference > String Functions
strlen
int strlen(string Target);
Synonyms:
int len(string Target);
int length(string Target);
Returns the number of characters in the supplied string
STRLEN returns the number of characters in the supplied string. This function is equivalent to the Visual Basic "Len" function, or the C "strlen()" function. Escaped characters are included in this count, for example a CR or LF (\r and \n) are counted as 1 character each.
The dual syntax LEN and LENGTH can be used in place of STRLEN.
Parameters
Target
The string to return the length of
Return Value
The length of the target string.
Example Code
// StringLength will equal 14
int StringLength = strlen("This is a test");
// Equivalent dual-syntax use
int StringLength = len("This is a test");int StringLength = length("This is a test");