LTRIM
Description
The LTRIM function is used to remove specified characters or spaces from the left side of the string str. If the trimStr parameter is not provided, all space characters on the left side of str are removed by default.
Parameter Description
str(string): The original string to be processed.trimStr(string, optional): Specifies the set of characters to be removed from the left side ofstr.
Return Result
Returns the processed string.
Usage Example
- Remove all spaces from the left side of the string:
- Remove specific characters from the left side of the string:
- 删除字符串左侧的多个字符(字符集):
- When
trimStris an empty string,strwill not be modified:
- If
trimStrcontains characters that do not exist instr, the LTRIM function will still remove the spaces on the left side ofstr:
Notes
- When the
trimStrparameter is empty or contains only spaces, the behavior of the LTRIM function is the same as the default behavior of theLTRIMfunction, which removes all spaces from the left side of the string. - If the
trimStrparameter contains non-printable characters or special characters, these characters will also be used to remove characters from the left side ofstr.
