Public Member Functions | |
| void | assign_from_another (other:&meshlib::std_string) |
| void | assign_from (other:&str) |
| auto | size () const -> usize |
| auto | data () const -> *const core::ffi::c_char |
| auto | data_mut () -> *const core::ffi::c_char |
| auto | data_end () const -> *const core::ffi::c_char |
| auto | data_end_mut () -> *mut core::ffi::c_char |
| auto | as_bytes () const -> &[u8] |
| auto | to_str () const -> Result<&str, core::str::Utf8Error > |
Static Public Member Functions | |
| static auto | new () -> meshlib::Owned< meshlib::std_string > |
| static auto | construct_from_another (other:&meshlib::std_string) -> meshlib::Owned< meshlib::std_string > |
| static auto | construct_from (other:&str) -> meshlib::Owned< meshlib::std_string > |
| Static Public Member Functions inherited from meshlib::CppClass | |
| static void | destroy (ptr:*mut Self) |
| Static Public Member Functions inherited from meshlib::CppCopy | |
| static auto | copy (ptr:*const Self) -> *mut Self |
A heap-allocated null-terminated string.
Generated from class std::string. Heap-allocated instances are held in Owned<std_string>.
| auto meshlib::std_string::as_bytes | ( | ) | const -> &[u8] |
| void meshlib::std_string::assign_from | ( | other:& | str | ) |
Assigns the contents.
Calls MR_std_string_AssignFrom().
| void meshlib::std_string::assign_from_another | ( | other:&meshlib::std_string | ) |
Assigns the contents from another instance. Both objects remain alive after the call.
Calls MR_std_string_AssignFromAnother(). The reference to the parameter other might be preserved in this object.
|
static |
Constructs a new instance.
Calls MR_std_string_ConstructFrom().
|
static |
Constructs a copy of another instance. The source remains alive.
Calls MR_std_string_ConstructFromAnother(). The reference to the parameter other might be preserved in the constructed object.
| auto meshlib::std_string::data | ( | ) | const -> *const core::ffi::c_char |
Returns the string contents, which are always null-terminated.
Calls MR_std_string_data(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.
| auto meshlib::std_string::data_end | ( | ) | const -> *const core::ffi::c_char |
Returns a pointer to the end of string, to its null-terminator.
Calls MR_std_string_data_end(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.
| auto meshlib::std_string::data_end_mut | ( | ) | -> *mut core::ffi::c_char |
Returns a pointer to the end of string, to its null-terminator. This version returns a non-const pointer.
Calls MR_std_string_data_end_mut(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.
| auto meshlib::std_string::data_mut | ( | ) | -> *const core::ffi::c_char |
Returns the string contents, which are always null-terminated. This version returns a non-const pointer.
Calls MR_std_string_data_mut(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_std_string_DefaultConstruct().
| auto meshlib::std_string::size | ( | ) | const -> usize |
The number of characters in the string, excluding the null-terminator.
Calls MR_std_string_size().
| auto meshlib::std_string::to_str | ( | ) | const -> Result<&str, core::str::Utf8Error > |