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

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -