MCPcopy Index your code
hub / github.com/Textualize/textual / decode_string

Function decode_string

src/textual/_binary_encode.py:251–262  ·  view source on GitHub ↗

Decode a (utf-8 encoded) string from the encoded data. Returns: A string.

()

Source from the content-addressed store, hash-verified

249 return bytes_string
250
251 def decode_string() -> str:
252 """Decode a (utf-8 encoded) string from the encoded data.
253
254 Returns:
255 A string.
256 """
257 size_bytes = b""
258 while (byte := get_byte()) != b":":
259 size_bytes += byte
260 bytes_string = get_bytes(int(size_bytes))
261 decoded_string = bytes_string.decode("utf-8", errors="replace")
262 return decoded_string
263
264 def decode_list() -> list[object]:
265 """Decode a list.

Callers

nothing calls this directly

Calls 2

get_byteFunction · 0.85
get_bytesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…