Module string

Module string 

Source
Available on crate feature string only.
Expand description

Dynamically sized UTF-8 encoded byte string.

Structs§

NSTDString
Dynamically sized UTF-8 encoded byte string.

Functions§

nstd_string_allocator
Returns an immutable reference to a string’s allocator.
nstd_string_as_bytes
Returns an immutable byte slice of the string’s active data.
nstd_string_as_ptr
Returns a raw pointer to a string’s memory.
nstd_string_as_str
Creates a string slice containing the contents of string.
nstd_string_as_str_mut
Creates a string slice containing the contents of string.
nstd_string_byte_len
Returns the number of bytes a string contains.
nstd_string_cap
Returns a string’s capacity.
nstd_string_clear
Sets a string’s length to zero.
nstd_string_clone
Creates a deep copy of a string.
nstd_string_free
Frees an instance of NSTDString.
nstd_string_from_bytes
Creates a new string from owned UTF-8 data.
nstd_string_from_f32
Creates a new NSTDString from an NSTDFloat32.
nstd_string_from_f64
Creates a new NSTDString from an NSTDFloat64.
nstd_string_from_i8
Creates a new NSTDString from an NSTDInt8.
nstd_string_from_i16
Creates a new NSTDString from an NSTDInt16.
nstd_string_from_i32
Creates a new NSTDString from an NSTDInt32.
nstd_string_from_i64
Creates a new NSTDString from an NSTDInt64.
nstd_string_from_int
Creates a new NSTDString from an NSTDInt.
nstd_string_from_str
Creates an owned version of an unowned string slice.
nstd_string_from_u8
Creates a new NSTDString from an NSTDUInt8.
nstd_string_from_u16
Creates a new NSTDString from an NSTDUInt16.
nstd_string_from_u32
Creates a new NSTDString from an NSTDUInt32.
nstd_string_from_u64
Creates a new NSTDString from an NSTDUInt64.
nstd_string_from_uint
Creates a new NSTDString from an NSTDUInt.
nstd_string_into_bytes
Returns ownership of an NSTDString’s raw data, taking ownership of said string.
nstd_string_len
Returns the number of Unicode characters in a string.
nstd_string_new
Creates a new instance of NSTDString.
nstd_string_new_with_cap
Creates a new string initialized with the given capacity.
nstd_string_pop
Removes the last character from a string and returns it.
nstd_string_push
Pushes an NSTDUnichar onto the end of a string.
nstd_string_push_str
Appends a string slice to the end of a string.

Type Aliases§

NSTDOptionalString
Represents an optional value of type NSTDString.