Function tvm::ffi::EscapedStringPy

Function tvm::ffi::EscapedStringPy#

Function Documentation#

inline String tvm::ffi::EscapedStringPy(const String &value)#

Return a Python-style escaped string representation.

Handles ANSI escape sequences, UTF-8 multibyte characters, and standard C escape sequences (\n, \t, \r, \, "). Uses \xNN for control characters and \uXXXX / \UXXXXXXXX for non-ASCII codepoints.

Parameters:

value – The input string to escape.

Returns:

The escaped string, quoted with double quotes.