Module str

Module str 

Source
Available on crate feature core only.
Expand description

An unowned view into a UTF-8 encoded byte string.

Structs§

NSTDStr
An immutable unowned view into a UTF-8 encoded byte string.
NSTDStrMut
An unowned view into a UTF-8 encoded byte string.

Functions§

nstd_core_str_as_bytes
Returns an immutable byte slice over str’s data.
nstd_core_str_as_cstr
Returns a C string slice variant of this UTF-8 encoded string slice.
nstd_core_str_as_ptr
Returns a raw pointer to a string slice’s memory.
nstd_core_str_byte_len
Returns the number of bytes a string slice contains.
nstd_core_str_from_bytes
Creates a string slice from raw bytes.
nstd_core_str_from_bytes_unchecked
Creates a string slice from raw bytes, without checking for UTF-8.
nstd_core_str_from_cstr
Creates a new instance of an NSTDStr from a C string slice.
nstd_core_str_from_cstr_unchecked
Creates a new instance of an NSTDStr from a C string slice.
nstd_core_str_from_raw_cstr
Creates a new NSTDStr from a raw C string.
nstd_core_str_from_raw_cstr_with_null
Creates a new NSTDStr from a raw C string, including the null byte.
nstd_core_str_get
Gets the NSTDUnichar at index pos in str.
nstd_core_str_len
Returns the number of Unicode characters in a string slice.
nstd_core_str_mut_as_bytes
Returns an immutable byte slice over str’s data.
nstd_core_str_mut_as_const
Creates an immutable version of a mutable string slice.
nstd_core_str_mut_as_cstr
Returns a C string slice variant of this UTF-8 encoded string slice.
nstd_core_str_mut_as_ptr
Returns an immutable raw pointer to a string slice’s memory.
nstd_core_str_mut_byte_len
Returns the number of bytes a string slice contains.
nstd_core_str_mut_from_bytes
Creates a string slice from raw bytes.
nstd_core_str_mut_from_bytes_unchecked
Creates a string slice from raw bytes, without checking for UTF-8.
nstd_core_str_mut_from_cstr
Creates a new instance of an NSTDStrMut from a C string slice.
nstd_core_str_mut_from_cstr_unchecked
Creates a new instance of an NSTDStrMut from a C string slice.
nstd_core_str_mut_from_raw_cstr
Creates a new NSTDStrMut from a raw C string.
nstd_core_str_mut_from_raw_cstr_with_null
Creates a new NSTDStrMut from a raw C string, including the null byte.
nstd_core_str_mut_get
Gets the NSTDUnichar at index pos in str.
nstd_core_str_mut_len
Returns the number of Unicode characters in a string slice.
nstd_core_str_mut_substr
Creates a substring of an existing string slice.
nstd_core_str_mut_to_f32
Attempts to parse a string slice as an NSTDFloat32.
nstd_core_str_mut_to_f64
Attempts to parse a string slice as an NSTDFloat64.
nstd_core_str_mut_to_i8
Attempts to parse a string slice as an NSTDInt8.
nstd_core_str_mut_to_i16
Attempts to parse a string slice as an NSTDInt16.
nstd_core_str_mut_to_i32
Attempts to parse a string slice as an NSTDInt32.
nstd_core_str_mut_to_i64
Attempts to parse a string slice as an NSTDInt64.
nstd_core_str_mut_to_int
Attempts to parse a string slice as an NSTDInt.
nstd_core_str_mut_to_u8
Attempts to parse a string slice as an NSTDUInt8.
nstd_core_str_mut_to_u16
Attempts to parse a string slice as an NSTDUInt16.
nstd_core_str_mut_to_u32
Attempts to parse a string slice as an NSTDUInt32.
nstd_core_str_mut_to_u64
Attempts to parse a string slice as an NSTDUInt64.
nstd_core_str_mut_to_uint
Attempts to parse a string slice as an NSTDUInt.
nstd_core_str_substr
Creates a substring of an existing string slice.
nstd_core_str_to_f32
Attempts to parse a string slice as an NSTDFloat32.
nstd_core_str_to_f64
Attempts to parse a string slice as an NSTDFloat64.
nstd_core_str_to_i8
Attempts to parse a string slice as an NSTDInt8.
nstd_core_str_to_i16
Attempts to parse a string slice as an NSTDInt16.
nstd_core_str_to_i32
Attempts to parse a string slice as an NSTDInt32.
nstd_core_str_to_i64
Attempts to parse a string slice as an NSTDInt64.
nstd_core_str_to_int
Attempts to parse a string slice as an NSTDInt.
nstd_core_str_to_u8
Attempts to parse a string slice as an NSTDUInt8.
nstd_core_str_to_u16
Attempts to parse a string slice as an NSTDUInt16.
nstd_core_str_to_u32
Attempts to parse a string slice as an NSTDUInt32.
nstd_core_str_to_u64
Attempts to parse a string slice as an NSTDUInt64.
nstd_core_str_to_uint
Attempts to parse a string slice as an NSTDUInt.

Type Aliases§

NSTDOptionalStr
Represents an optional value of type NSTDStr.
NSTDOptionalStrMut
Represents an optional value of type NSTDStrMut.