Fix the order of arguments to strings.TrimRight

This commit is contained in:
Kaushal Modi 2018-12-13 17:12:36 -05:00 committed by GitHub
parent f1f9b7cd63
commit 0982f65c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"