STRING::LTRIM
1g 2023-11-12 laplante@plcb.ca GOWEB/STRING — Left Trim Characters from Stringtitle: “STRING::LTRIM” version: “1.0.0” date: 2023-11-12 author: “laplante@plcb.ca” section: “1g”
string::ltrim Trim left characters from string
string::ltrim(expression[, cutset: string])
ltrim(expression[, cutset: string])
The ltrim
function removes all leading characters from the given string expression
that match any character in the cutset
.
" \t\n\v"
(spaces, tabs, newlines, and vertical tabs).If expression
is an array, ltrim
is applied to each element.
res={{
ltrim(" hello"); "\n";
ltrim(" Pierre Laplante "); "\n";
a := "\n\nabc"; "\n";
ltrim(a); "\n";
a = "3223987diufhwrifuh23892938472";
ltrim(a, cutset:"1234567890"); "\n";
a = [ "a ", "\nb", "\tc", "\vd" ];
b := " abc";
ltrim(a, b); "\n";
}}.
Returns:
res=hello
Pierre Laplante
abc
diufhwrifuh23892938472
[["a ","b","c","d"],"abc"]
laplante@plcb.ca