1
0
mirror of https://github.com/golang/go synced 2024-11-06 07:36:13 -07:00
go/src/strings
Illirgway e7c56fe994 strings: adding micro-optimization for TrimSpace
replace for string's end trimming TrimFunc -> TrimRightFunc

strings.TrimSpace string's end trimming should use more specific TrimRightFunc instead of common TrimFunc (because start has already trimmed before)

Change-Id: I827f1a25c141e61edfe1f8b11f6e8cd685f8b384
GitHub-Last-Rev: 040607a831
GitHub-Pull-Request: golang/go#46862
Reviewed-on: https://go-review.googlesource.com/c/go/+/329731
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-04-29 02:01:27 +00:00
..
builder_test.go
builder.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
clone_test.go
clone.go
compare_test.go
compare.go
example_test.go strings: document the use of simple case-folding in EqualFold 2022-04-02 06:48:45 +00:00
export_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
reader_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
reader.go
replace_test.go
replace.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
search_test.go
search.go
strings_test.go strings: limits allocation size for SplitN 2022-03-31 05:24:51 +00:00
strings.go strings: adding micro-optimization for TrimSpace 2022-04-29 02:01:27 +00:00