HUGO
Menu
GitHub 90272 stars Mastodon

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" }} → bba

Converting non-string arguments:

{{ strings.TrimLeft 21 12345 }} → 345 (string)
{{ strings.TrimLeft "rt" true }} → ue