• Martin Sucha's avatar
    strings: clarify example of ContainsAny · db325553
    Martin Sucha authored
    I have seen code that literally copied the example like this:
    
        if strings.ContainsAny(s, "1 & 2 & 3") {
    
    The developer apparently thought that this is the way to
    specify multiple characters and I noticed this pattern
    being used in the example. Let's update the example so
    that it's clear how multiple Unicode code points should
    be specified.
    
    Change-Id: Id4d780555e521af62fb787a7950be1e60848cd95
    Reviewed-on: https://go-review.googlesource.com/c/go/+/178737Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    db325553
example_test.go 8.43 KB