1
0
mirror of https://github.com/golang/go synced 2024-11-20 10:24:40 -07:00
go/src/strings
Russ Cox fd4dc91a96 strings: remove overengineered Compare implementation
The function is here ONLY for symmetry with package bytes.
This function should be used ONLY if it makes code clearer.
It is not here for performance. Remove any performance benefit.

If performance becomes an issue, the compiler should be fixed to
recognize the three-way compare (for all comparable types)
rather than encourage people to micro-optimize by using this function.

Change-Id: I71f4130bce853f7aef724c6044d15def7987b457
Reviewed-on: https://go-review.googlesource.com/3012
Reviewed-by: Rob Pike <r@golang.org>
2015-01-19 02:19:17 +00:00
..
compare_test.go strings: add Compare(x, y string) int, for symmetry with bytes.Compare 2015-01-15 17:17:05 +00:00
compare.go strings: remove overengineered Compare implementation 2015-01-19 02:19:17 +00:00
example_test.go
export_test.go
reader_test.go
reader.go
replace_test.go
replace.go
search_test.go
search.go
strings_decl.go strings: remove overengineered Compare implementation 2015-01-19 02:19:17 +00:00
strings_test.go
strings.go strings: use fast path for IndexRune 2014-10-06 15:10:51 -07:00
strings.s