MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _decode_uXXXX

Function _decode_uXXXX

tools/python-3.11.9-amd64/Lib/json/decoder.py:59–67  ·  view source on GitHub ↗
(s, pos)

Source from the content-addressed store, hash-verified

57}
58
59def _decode_uXXXX(s, pos):
60 esc = s[pos + 1:pos + 5]
61 if len(esc) == 4 and esc[1] not in 'xX':
62 try:
63 return int(esc, 16)
64 except ValueError:
65 pass
66 msg = "Invalid \\uXXXX escape"
67 raise JSONDecodeError(msg, s, pos)
68
69def py_scanstring(s, end, strict=True,
70 _b=BACKSLASH, _m=STRINGCHUNK.match):

Callers 1

py_scanstringFunction · 0.85

Calls 1

JSONDecodeErrorClass · 0.70

Tested by

no test coverage detected