Link Search Menu Expand Document

left

Explanation Extracts the specified length from the beginning (left end) of the character string.
Call format var s = left( character string, length [, processing unit ]
Return value Extracted character string
Arguments String string Original character string
Integer length Number of characters to extract
Integer processing unit 0: Treat as one character without distinguishing between half-width and full-width
1: Half-width characters are treated as one character, and full-width characters are treated as two characters. If omitted, half-width and full-width characters will not be distinguished.
*AI does not distinguish between half-width and full-width characters regardless of the argument*
Exception None
Example of use
var str = "I have a book. I have a pen.";
var s = left(str, 14);
print(s, "\n");
Related item mid, right method