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

Function isUTF16EncodedRune

escape.go:118–120  ·  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) || !isUTF16En

(r rune)

Source from the content-addressed store, hash-verified

116// return !(r > basicMultilingualPlaneReservedOffset) || !isUTF16EncodedRune(r)
117// }
118func isUTF16EncodedRune(r rune) bool {
119 return 0xD800 <= r && r <= 0xDFFF
120}
121
122// SYS-REQ-115
123func decodeUnicodeEscape(in []byte) (rune, int) {

Callers 1

decodeUnicodeEscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected