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
+2 -2
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"