Deprecated Functions
Return the input string left-padded to the length n. | |
Return the input string right-padded to the length n. | |
Return the input string with all leftmost trim characters removed. | |
Return the input string with all rightmost trim characters removed. |
function
str_lpad()
std::str_lpad(string: str, n: int64, fill: str = ‘ ‘) -> str
Return the input string left-padded to the length n.
This function is deprecated. Use std::str_pad_start() instead.
If the string is longer than n, then it is truncated to the first n characters. Otherwise, the string is padded on the left up to the total length n using fill characters (space by default).
select str_lpad('short', 10);
{' short'}
select str_lpad('much too long', 10);
{'much too l'}
select str_lpad('short', 10, '.:');
{'.:.:.short'}
function
str_rpad()
std::str_rpad(string: str, n: int64, fill: str = ‘ ‘) -> str
Return the input string right-padded to the length n.
This function is deprecated. Use std::str_pad_end() instead.
If the string is longer than n, then it is truncated to the first n characters. Otherwise, the string is padded on the right up to the total length n using fill characters (space by default).
select str_rpad('short', 10);
{'short '}
select str_rpad('much too long', 10);
{'much too l'}
select str_rpad('short', 10, '.:');
{'short.:.:.'}
function
str_ltrim()
std::str_ltrim(string: str, trim: str = ‘ ‘) -> str
Return the input string with all leftmost trim characters removed.
This function is deprecated. Use std::str_trim_start() instead.
If the trim specifies more than one character they will be removed from the beginning of the string regardless of the order in which they appear.
select str_ltrim(' data');
{'data'}
select str_ltrim('.....data', '.:');
{'data'}
select str_ltrim(':::::data', '.:');
{'data'}
select str_ltrim(':...:data', '.:');
{'data'}
select str_ltrim('.:.:.data', '.:');
{'data'}
function
str_rtrim()
std::str_rtrim(string: str, trim: str = ‘ ‘) -> str
Return the input string with all rightmost trim characters removed.
This function is deprecated. Use std::str_trim_end() instead.
If the trim specifies more than one character they will be removed from the end of the string regardless of the order in which they appear.
select str_rtrim('data ');
{'data'}
select str_rtrim('data.....', '.:');
{'data'}
select str_rtrim('data:::::', '.:');
{'data'}
select str_rtrim('data:...:', '.:');
{'data'}
select str_rtrim('data.:.:.', '.:');
{'data'}