isUTF16EncodedRune checks if a rune is in the range for non-BMP characters, which is used to describe UTF16 chars. Source: https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane
(r rune)
| 57 | // which is used to describe UTF16 chars. |
| 58 | // Source: https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane |
| 59 | func isUTF16EncodedRune(r rune) bool { |
| 60 | return highSurrogateOffset <= r && r <= basicMultilingualPlaneReservedOffset |
| 61 | } |
| 62 | |
| 63 | func decodeUnicodeEscape(in []byte) (rune, int) { |
| 64 | if r, ok := decodeSingleUnicodeEscape(in); !ok { |
no outgoing calls
no test coverage detected
searching dependent graphs…