LEFT
Function
Returns the leftmost len characters of the string str.
Parameters
- str: string type
- len: int type, the number of characters to return
Returns
- string type, returns the leftmost
lencharacters of the string. - If
lenis less than or equal to 0, returns an empty string. - If
lenis greater than the string length, returns the full string.
Examples
Notes
- Supports Unicode characters, counting by character (not by byte).
- Returns an empty string when the
lenparameter is negative.
