Available on crate feature
core only.Expand description
Unowned C string slices.
Modules§
- raw
- Raw C string processing.
Structs§
- NSTDC
Str - An immutable slice of a C string.
- NSTDC
StrMut - A mutable slice of a C string.
Functions§
- nstd_
core_ cstr_ as_ bytes - Returns a byte slice of a C string slice’s data.
- nstd_
core_ cstr_ as_ ptr - Returns a pointer to the first character in a C string slice.
- nstd_
core_ cstr_ first - Returns a pointer to the first character in a C string slice, or null if it is empty.
- nstd_
core_ ⚠cstr_ from_ raw - Creates a new instance of
NSTDCStrfrom a raw C string, excluding the null byte. - nstd_
core_ ⚠cstr_ from_ raw_ with_ null - Creates a new instance of
NSTDCStrfrom a raw C string, including the null byte. - nstd_
core_ cstr_ get - Return a pointer to the character at index
posincstr. - nstd_
core_ ⚠cstr_ get_ null - Returns a pointer to the first null byte in a C string slice if one is present.
- nstd_
core_ ⚠cstr_ is_ null_ terminated - Determines whether or not a C string slice is null terminated. This will return false if the C string slice contains any null bytes before the last byte.
- nstd_
core_ cstr_ last - Returns a pointer to the last character in a C string slice, or null if it is empty.
- nstd_
core_ cstr_ len - Returns the length of a C string slice.
- nstd_
core_ cstr_ mut_ as_ bytes - Returns a byte slice of a C string slice’s data.
- nstd_
core_ cstr_ mut_ as_ const - Creates an immutable version of a mutable C string slice.
- nstd_
core_ cstr_ mut_ as_ ptr - Returns a pointer to the first character in a C string slice.
- nstd_
core_ cstr_ mut_ as_ ptr_ const - Returns a pointer to the first character in a C string slice.
- nstd_
core_ cstr_ mut_ first - Returns a pointer to the first character in a C string slice, or null if it is empty.
- nstd_
core_ cstr_ mut_ first_ const - Returns an immutable pointer to the first character in a C string slice, or null if it is empty.
- nstd_
core_ ⚠cstr_ mut_ from_ raw - Creates a new instance of
NSTDCStrMutfrom a raw C string, excluding the null byte. - nstd_
core_ ⚠cstr_ mut_ from_ raw_ with_ null - Creates a new instance of
NSTDCStrMutfrom a raw C string, including the null byte. - nstd_
core_ cstr_ mut_ get - Return a pointer to the character at index
posincstr. - nstd_
core_ cstr_ mut_ get_ const - Return an immutable pointer to the character at index
posincstr. - nstd_
core_ ⚠cstr_ mut_ get_ null - Returns a pointer to the first null byte in a C string slice if one is present.
- nstd_
core_ ⚠cstr_ mut_ get_ null_ const - Returns an immutable pointer to the first null byte in a C string slice if one is present.
- nstd_
core_ ⚠cstr_ mut_ is_ null_ terminated - Determines whether or not a C string slice is null terminated. This will return false if the C string slice contains any null bytes before the last byte.
- nstd_
core_ cstr_ mut_ last - Returns a pointer to the last character in a C string slice, or null if it is empty.
- nstd_
core_ cstr_ mut_ last_ const - Returns an immutable pointer to the last character in a C string slice, or null if it is empty.
- nstd_
core_ cstr_ mut_ len - Returns the length of a C string slice.
- nstd_
core_ cstr_ mut_ new - Creates a new C string slice from a raw pointer and a size.
- nstd_
core_ ⚠cstr_ mut_ new_ unchecked - Creates a new C string slice from a raw pointer and a size without checking if
rawis null. - nstd_
core_ cstr_ new - Creates a new C string slice from a raw pointer and a size.
- nstd_
core_ ⚠cstr_ new_ unchecked - Creates a new C string slice from a raw pointer and a size without checking if
rawis null.
Type Aliases§
- NSTD
OptionalC Str - Represents an optional value of type
NSTDCStr. - NSTD
OptionalC StrMut - Represents an optional value of type
NSTDCStrMut.