trimLeft

trimLeft, function

def const pure trimLeft(t: text, toTrim: text): text

Removes characters from the beginning of t. The characters to remove are listed in toTrim.

Examples

trimLeft(" # abcde### ", " #") returns "abcde### ".

trimLeft(" # abcde### ", " ") returns "# abcde### ".

trimLeft(" # abcde### ", "") returns " # abcde### ".

Remarks

The toTrim argument is interpreted as a set of characters, not as a prefix. All leading characters found in that set are removed until the first character that is not in the set.

See also

User Contributed Notes
0 notes + add a note