unicode - ContainsRune giving strange results -
i'm running code in go playground:
fmt.println(strings.containsrune("\xa0", '\xa0'))
i'm wondering, why output false
? according docs, says:
containsrune returns true if unicode code point r within s.
it seems me code point there, seems strange give false
response.
"\x0a" not unicode code point.
fmt.println(strings.containsrune("\u00a0", '\u00a0'))
works, expected.
Comments
Post a Comment