• Rob Pike's avatar
    unicode: add "In" function to test membership of a rune · 6a801539
    Rob Pike authored
    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://golang.org/cl/11672044
    6a801539
graphic.go 4.35 KB