Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(249)

Issue 5143044: code review 5143044: strings: add CaseFoldedEqual (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by rsc
Modified:
12 years, 6 months ago
Reviewers:
r2, bradfitz
CC:
golang-dev, r
Visibility:
Public.

Description

strings: add EqualFold Case-insensitive strcmp without using ToLower. (Using ToLower is not always correct, and it allocates.)

Patch Set 1 #

Patch Set 2 : diff -r 72966e9d87da https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 583b7464b4e3 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -49 lines) Patch
M src/pkg/strings/strings.go View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
M src/pkg/strings/strings_test.go View 1 2 13 chunks +58 lines, -49 lines 0 comments Download

Messages

Total messages: 6
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 6 months ago (2011-09-26 17:10:45 UTC) #1
r
LGTM but the name is lame. you can drop the Case part at least: FoldedEqual. ...
12 years, 6 months ago (2011-09-26 17:31:56 UTC) #2
rsc
Shortened to EqualFold.
12 years, 6 months ago (2011-09-26 18:27:47 UTC) #3
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=a5aee6f39a7e *** strings: add EqualFold Case-insensitive strcmp without using ToLower. (Using ToLower ...
12 years, 6 months ago (2011-09-26 22:32:55 UTC) #4
bradfitz
So why just in strings and not also in bytes? I haven't learned the rule ...
12 years, 6 months ago (2011-09-26 22:34:31 UTC) #5
r2
12 years, 6 months ago (2011-09-26 22:35:42 UTC) #6
On Sep 26, 2011, at 3:34 PM, Brad Fitzpatrick wrote:

> So why just in strings and not also in bytes?  I haven't learned the rule /
line yet.

the rule is that they should be close to equivalent, so this is an error.

-rob


Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b