MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / _UStr

Function _UStr

extern/re2/re2/unicode.py:78–94  ·  view source on GitHub ↗

Converts Unicode code point to hex string. 0x263a => '0x263A'. Args: v: code point to convert Returns: Unicode string Raises: InputError: the argument is not a valid Unicode value.

(v)

Source from the content-addressed store, hash-verified

76
77
78def _UStr(v):
79 """Converts Unicode code point to hex string.
80
81 0x263a => '0x263A'.
82
83 Args:
84 v: code point to convert
85
86 Returns:
87 Unicode string
88
89 Raises:
90 InputError: the argument is not a valid Unicode value.
91 """
92 if v < 0 or v > _RUNE_MAX:
93 raise InputError("invalid Unicode value %s" % (v,))
94 return "0x%04X" % (v,)
95
96
97def _ParseContinue(s):

Callers

nothing calls this directly

Calls 1

InputErrorClass · 0.85

Tested by

no test coverage detected