MCPcopy Create free account
hub / github.com/buger/jsonparser / isUTF16EncodedRune

Function isUTF16EncodedRune

escape.go:111–113  ·  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 reqproof:lemma isUTF16EncodedRune_low_excluded func(r rune) bool { return !(r < 0xD800) || !isUTF16Encode

(r rune)

Source from the content-addressed store, hash-verified

109// return !(r > basicMultilingualPlaneReservedOffset) || !isUTF16EncodedRune(r)
110// }
111func isUTF16EncodedRune(r rune) bool {
112 return 0xD800 <= r && r <= 0xDFFF
113}
114
115func decodeUnicodeEscape(in []byte) (rune, int) {
116 if r, ok := decodeSingleUnicodeEscape(in); !ok {

Callers 1

decodeUnicodeEscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected