types.String.lstrip
Method on every
stringReturns str with white space removed from the beginning only.
Return value
A new string with the leading white space removed; trailing white space, if any, is kept. See string.lstrip for which bytes count as white space.
Notes
Takes no arguments. Same implementation as string.lstrip; see the Notes on types.String.strip for how the two forms differ only in their reported attributes, not their behavior.
Example
println($"[{" hi ".lstrip()}]")Output:
[hi ]See also
strip | Returns str with white space removed from both ends. |
rstrip | Returns str with white space removed from the end only. |
lstrip | Returns str with white-space characters removed from the beginning only. |
| string | class index |