Available on crate feature
cstring only.Expand description
A dynamically sized, null terminated, C string.
Structs
- A dynamically sized, null terminated, C string.
Functions
- Returns an immutable reference to a C string’s allocator.
- Returns an immutable byte slice of the C string’s active data, including the null byte.
- Creates a C string slice containing the contents of
cstring. - Returns a raw pointer to a C string’s memory.
- Returns a C string’s capacity.
- Sets a C string’s length to zero.
- Creates a deep copy of an
NSTDCString. - Frees an instance of
NSTDCString. - Creates a new C string from owned data.
- Creates an owned version of an unowned C string slice.
- Creates an owned version of an unowned C string slice without checking if the slice contains any null bytes.
- Returns ownership of an
NSTDCString’s raw data, taking ownership of said C string. - Returns the number of
chars in a C string, excluding the null terminator. - Returns the number of
chars in a C string, including the null terminator. - Creates a new empty
NSTDCString. - Creates a new
NSTDCStringinitialized with the given capacity. - Removes the last character from a C string and returns it.
- Appends an
NSTDCharto the end of anNSTDCString. - Appends a C string slice to the end of a C string.
Type Aliases
- Represents an optional value of type
NSTDCString.