string trimleft

Gives a string with given characters removed at the start.

string trimleft STRING ?CHARS?

Description

Removes each character of the set CHARS from the start of STRING only. CHARS follows the rules of string trim.

Arguments

ArgumentTypeDefaultDescription
STRINGstringrequiredThe text to trim.
CHARSstringwhite spaceThe set of characters to remove.

Returns

The new string.

Examples

% string trimleft "  a  "
a  

% string trimleft 0012 0
12

Errors

% string trimleft
wrong # args: should be "string trimleft string ?chars?"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also