Returns the specified characters of the input string.
Parameters
String |
The string from which to get the characters. |
Number of Characters |
The number of characters to get, starting at the beginning of the string. |
Format
String_Left (String, Number of Characters)
Return Value
Returns a string with just the first n characters of the input string. If the input string is less than n characters, the entire string is returned.
Example
Script(String_Left_Test)
String(strEntered)
String(strLeftPart)
Activate(From_Menu)
strEntered = Ask_String("Enter some text", "String_Left_Test", 1, 99, "")
strLeftPart = String_Left(strEntered, 2)
Ask_OK(strLeftPart, "String_Left 2 characters")
Return
See Also
String_Set, String_Combine, String_Right, String_Middle, String_Upper, String_Lower, String_Replace, String_Only_Characters, String_Strip_Characters, String_Trim_Spaces_Start, String_Trim_Spaces_End, Number_To_String_Binary, Number_To_String_Octal, Number_To_String_Decimal, Number_To_String_Hexadecimal_Lowercase, Number_To_String_Hexadecimal_Uppercase, Ask_String, Ask_String_Password, Ask_String_Uppercase, Ask_String_Lowercase, String_Equal
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other