strings.TrimLeft
Returns the given string, removing leading characters specified in the cutset.
- Syntax
- strings.TrimLeft CUTSET STRING
- Returns
- string
Usage
The strings.TrimLeft function returns the given string, removing leading characters specified in the cutset. The function converts the arguments to strings if possible.
Examples
{{ strings.TrimLeft "a" "abba" }} → bbaConverting non-string arguments:
{{ strings.TrimLeft 21 12345 }} → 345 (string)
{{ strings.TrimLeft "rt" true }} → ueLast updated:
October 28, 2026
:
content: Apply style guide to strings functions (d6de31ebd)
Improve this page