Descriptionunicode: 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/ #
MessagesTotal messages: 3
|