Retrieves a number of characters from the left or right-hand side of a string.
StringLeft, OutputVar, InputVar, Count StringRight, OutputVar, InputVar, Count NewStr := SubStr(String, StartPos [, Length]) ; See the SubStr() function for details.
The name of the variable in which to store the substring extracted from InputVar.
The name of the variable whose contents will be extracted from. Do not enclose the name in percent signs unless you want the contents of the variable to be used as the name.
The number of characters to extract, which can be an expression. If Count is less than or equal to zero, OutputVar will be made empty (blank). If Count exceeds the length of InputVar, OutputVar will be set equal to the entirety of InputVar.
For this and all other commands, OutputVar is allowed to be the same variable as an InputVar.
SubStr(), StringMid, StringTrimLeft, StringTrimRight, IfInString, StringGetPos, StringLen, StringLower, StringUpper, StringReplace
String = This is a test. StringLeft, OutputVar, String, 4 ; Stores the string "This" in OutputVar. StringRight, OutputVar, String, 5 ; Stores the string "test." in OutputVar.