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

Issue 11672044: code review 11672044: unicode: add "In" function to test membership of a rune (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by r
Modified:
11 years, 8 months ago
Reviewers:
adg
CC:
golang-dev, adg
Visibility:
Public.

Description

unicode: add "In" function to test membership of a rune The existing function, IsOneOf, is hard to use. Since the slice comes before the rune, in parallelism with the other Is functions, the slice is clumsy to build. This CL adds a nicer-signatured In function of equivalent functionality (its implementation is identical) that's much easier to use. Compare: unicode.IsOneOf([]*unicode.RangeTable{unicode.Letter, unicode.Number}, r) unicode.In(r, unicode.Letter, unicode.Number)

Patch Set 1 #

Total comments: 1

Patch Set 2 : diff -r 977306015f5d https://code.google.com/p/go/ #

Patch Set 3 : diff -r f76748f48464 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -6 lines) Patch
M src/pkg/unicode/graphic.go View 1 2 2 chunks +15 lines, -4 lines 0 comments Download
M src/pkg/unicode/graphic_test.go View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 8 months ago (2013-07-23 23:48:00 UTC) #1
adg
LGTM https://codereview.appspot.com/11672044/diff/1/src/pkg/unicode/graphic.go File src/pkg/unicode/graphic.go (right): https://codereview.appspot.com/11672044/diff/1/src/pkg/unicode/graphic.go#newcode68 src/pkg/unicode/graphic.go:68: // In reports whether the rune is a ...
11 years, 8 months ago (2013-07-23 23:57:46 UTC) #2
r
11 years, 8 months ago (2013-07-24 00:28:04 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=75a0726970a4 ***

unicode: add "In" function to test membership of a rune
The existing function, IsOneOf, is hard to use. Since the slice comes
before the rune, in parallelism with the other Is functions, the slice
is clumsy to build. This CL adds a nicer-signatured In function of
equivalent functionality (its implementation is identical) that's much
easier to use. Compare:
        unicode.IsOneOf([]*unicode.RangeTable{unicode.Letter, unicode.Number},
r)
        unicode.In(r, unicode.Letter, unicode.Number)

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/11672044
Sign in to reply to this message.

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