mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '5a83bf314f4c0ce1d61341e0a1df21c9998e8154'
This commit is contained in:
@@ -20,9 +20,8 @@ aliases: []
|
||||
|
||||
Given the string `"abba"`, leading `"a"`'s can be removed a follows:
|
||||
|
||||
{{ strings.TrimLeft "abba" "a" }} → "bba"
|
||||
{{ strings.TrimLeft "a" "abba" }} → "bba"
|
||||
|
||||
Numbers can be handled as well:
|
||||
|
||||
{{ strings.TrimLeft 1221 "12" }} → ""
|
||||
|
||||
{{ strings.TrimLeft 12 1221341221 }} → "341221"
|
||||
|
@@ -20,9 +20,9 @@ aliases: []
|
||||
|
||||
Given the string `"abba"`, trailing `"a"`'s can be removed a follows:
|
||||
|
||||
{{ strings.TrimRight "abba" "a" }} → "abb"
|
||||
{{ strings.TrimRight "a" "abba" }} → "abb"
|
||||
|
||||
Numbers can be handled as well:
|
||||
|
||||
{{ strings.TrimRight 1221 "12" }} → ""
|
||||
{{ strings.TrimRight 12 1221341221 }} → "122134"
|
||||
|
||||
|
Reference in New Issue
Block a user