MCPcopy
hub / github.com/buger/jsonparser / isUTF16EncodedRune

Function isUTF16EncodedRune

escape.go:59–61  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

57// which is used to describe UTF16 chars.
58// Source: https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane
59func isUTF16EncodedRune(r rune) bool {
60 return highSurrogateOffset <= r && r <= basicMultilingualPlaneReservedOffset
61}
62
63func decodeUnicodeEscape(in []byte) (rune, int) {
64 if r, ok := decodeSingleUnicodeEscape(in); !ok {

Callers 1

decodeUnicodeEscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…