Functions | |
def | CEscape (text, as_utf8) |
def | CUnescape (text) |
Variables | |
tuple | _cescape_byte_to_str |
dictionary | _cescape_chr_to_symbol_map = {} |
list | _cescape_unicode_to_str = [chr(i) for i in range(0, 256)] |
_CUNESCAPE_HEX = re.compile(r'(\\+)x([0-9a-fA-F])(?![0-9a-fA-F])') | |
def google.protobuf.text_encoding.CEscape | ( | text, | |
as_utf8 | |||
) |
Escape a bytes string for use in an text protocol buffer. Args: text: A byte string to be escaped. as_utf8: Specifies if result may contain non-ASCII characters. In Python 3 this allows unescaped non-ASCII Unicode characters. In Python 2 the return value will be valid UTF-8 rather than only ASCII. Returns: Escaped string (str).
Definition at line 58 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.
def google.protobuf.text_encoding.CUnescape | ( | text | ) |
Unescape a text string with C-style escape sequences to UTF-8 bytes. Args: text: The data to parse in a str. Returns: A byte string.
Definition at line 91 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.
|
private |
Definition at line 50 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.
|
private |
Definition at line 36 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.
|
private |
Definition at line 45 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.
|
private |
Definition at line 88 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.