in unicode/utf16 EncodeRune:
func EncodeRune(r rune) (r1, r2 rune) {
if r < surrSelf || r > maxRune || IsSurrogate(r) {
return replacementChar, replacementChar
}
r -= surrSelf
return surr1 + (r>>10)&0x3ff, surr2 + r&0x3ff
}
can remove || IsSurrogate(r) ???
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.