STRING::LTRIM 1g 2023-11-12 laplante@plcb.ca GOWEB/STRING — Left Trim Characters from String


title: “STRING::LTRIM” version: “1.0.0” date: 2023-11-12 author: “laplante@plcb.ca” section: “1g”

category: “GOWEB/STRING”

Name

string::ltrim Trim left characters from string

Synopsis

string::ltrim(expression[, cutset: string])
ltrim(expression[, cutset: string])

Description

The ltrim function removes all leading characters from the given string expression that match any character in the cutset.

If expression is an array, ltrim is applied to each element.


Examples

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"]

Author

laplante@plcb.ca

See Also


Version