strings: make variable/type association consistent in function signatures

The type annotation of some trim functions are inconsistent with all
other function signatures of the strings package.

Example:
func TrimRight(s string, cutset string) string

To be:
func TrimRight(s, cutset string) string

Change-Id: I456a33287bfb4ad6a7962e30a6424f209ac320c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/226339
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Alexander Greim 2020-03-29 17:10:44 +02:00 committed by Ian Lance Taylor
parent 7bfac4c3dd
commit 0b7c202e98

View file

@ -828,7 +828,7 @@ func makeCutsetFunc(cutset string) func(rune) bool {
// Trim returns a slice of the string s with all leading and
// trailing Unicode code points contained in cutset removed.
func Trim(s string, cutset string) string {
func Trim(s, cutset string) string {
if s == "" || cutset == "" {
return s
}
@ -839,7 +839,7 @@ func Trim(s string, cutset string) string {
// Unicode code points contained in cutset removed.
//
// To remove a prefix, use TrimPrefix instead.
func TrimLeft(s string, cutset string) string {
func TrimLeft(s, cutset string) string {
if s == "" || cutset == "" {
return s
}
@ -850,7 +850,7 @@ func TrimLeft(s string, cutset string) string {
// Unicode code points contained in cutset removed.
//
// To remove a suffix, use TrimSuffix instead.
func TrimRight(s string, cutset string) string {
func TrimRight(s, cutset string) string {
if s == "" || cutset == "" {
return s
}