Shiny Language Reference
Language Reference > String Functions
strleft
string strleft(string Target, int Chars);
Synonyms:
string left(string Target, int Chars);
Returns N chars from the left of the supplied string
STRLEFT returns N characters from the start of the supplied string. This function is equivalent to the Visual Basic "Left" function.
The dual syntax LEFT can be used in place of STRLEFT.
Parameters
Target
The string to return a substring from
Chars
The number of characters to return
Return Value
The substring of N characters from the left of the target string.
Example Code
// SubString will contain "This"
string SubString = strleft("This is a test", 4);
// Equivalent dual-syntax use
string SubString = left("This is a test", 4);