diff options
Diffstat (limited to 'src/pkg/strings/strings.go')
| -rw-r--r-- | src/pkg/strings/strings.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pkg/strings/strings.go b/src/pkg/strings/strings.go index 594f03527e..925566c744 100644 --- a/src/pkg/strings/strings.go +++ b/src/pkg/strings/strings.go @@ -422,8 +422,7 @@ func LastIndexFunc(s string, f func(r int) bool) int { // indexFunc is the same as IndexFunc except that if // truth==false, the sense of the predicate function is -// inverted. We could use IndexFunc directly, but this -// way saves a closure allocation. +// inverted. func indexFunc(s string, f func(r int) bool, truth bool) int { start := 0 for start < len(s) { @@ -442,8 +441,7 @@ func indexFunc(s string, f func(r int) bool, truth bool) int { // lastIndexFunc is the same as LastIndexFunc except that if // truth==false, the sense of the predicate function is -// inverted. We could use IndexFunc directly, but this -// way saves a closure allocation. +// inverted. func lastIndexFunc(s string, f func(r int) bool, truth bool) int { end := len(s) for end > 0 { |
