Available on crate feature
cstring only.Expand description
A dynamically sized, null terminated, C string.
Structs§
- NSTDC
String - A dynamically sized, null terminated, C string.
Functions§
- nstd_
cstring_ allocator - Returns an immutable reference to a C string’s allocator.
- nstd_
cstring_ as_ bytes - Returns an immutable byte slice of the C string’s active data, including the null byte.
- nstd_
cstring_ as_ cstr - Creates a C string slice containing the contents of
cstring. - nstd_
cstring_ as_ ptr - Returns a raw pointer to a C string’s memory.
- nstd_
cstring_ cap - Returns a C string’s capacity.
- nstd_
cstring_ clear - Sets a C string’s length to zero.
- nstd_
cstring_ clone - Creates a deep copy of an
NSTDCString. - nstd_
cstring_ free - Frees an instance of
NSTDCString. - nstd_
cstring_ from_ bytes - Creates a new C string from owned data.
- nstd_
cstring_ ⚠from_ cstr - Creates an owned version of an unowned C string slice.
- nstd_
cstring_ ⚠from_ cstr_ unchecked - Creates an owned version of an unowned C string slice without checking if the slice contains any null bytes.
- nstd_
cstring_ into_ bytes - Returns ownership of an
NSTDCString’s raw data, taking ownership of said C string. - nstd_
cstring_ len - Returns the number of
chars in a C string, excluding the null terminator. - nstd_
cstring_ len_ with_ null - Returns the number of
chars in a C string, including the null terminator. - nstd_
cstring_ new - Creates a new empty
NSTDCString. - nstd_
cstring_ new_ with_ cap - Creates a new
NSTDCStringinitialized with the given capacity. - nstd_
cstring_ pop - Removes the last character from a C string and returns it.
- nstd_
cstring_ push - Appends an
NSTDCharto the end of anNSTDCString. - nstd_
cstring_ ⚠push_ cstr - Appends a C string slice to the end of a C string.
Type Aliases§
- NSTD
OptionalC String - Represents an optional value of type
NSTDCString.