String class¶
This python interface is not intended to provide the full functionality of the corresponding C++ class.
Class std_string¶
- class o2sclpy.std_string(pointer=0)¶
Note that std_string objects are not “immutable” like Python strings.
- __init__(pointer=0)¶
Init function for class std_string
Parameters:pointerctypes.c_void_p
pointer
- __del__()¶
Delete function for class std_string
- __copy__()¶
Shallow copy function for class std_string
Returns: std_string object
- __deepcopy__(memo)¶
Deep copy function for class std_string
Returns: new copy of the std_string object
- __getitem__(n)¶
- Parameters:n:
size_t
- __setitem__(i, value)¶
- Parameters:i:
size_t
value:char
- init_bytes(s)¶
Initialize the string from a Python bytes object
Parameters:s: a Python bytes string
- length()¶
- Returns: a Python int
- resize(n)¶
- Parameters:n:
size_t
- to_bytes()¶
Copy the string to a Python bytes object
Returns: a Python bytes string