Skip to main content

new_py_string

No overview available.

def new_py_string(
c_str: char*
) - > str

Creates a new Python string object from a C-style null-terminated character array. This is typically used when interfacing with C extensions to convert native character buffers into Python-accessible string objects.

Parameters

NameTypeDescription
c_strchar*A pointer to the null-terminated C character array to be converted.

Returns

TypeDescription
strA Python string object containing the data from the input character buffer.