Module str

Source
Expand description

String representations.

Structs§

BStr
Byte string without UTF-8 validity guarantee.
CStr
A string that is guaranteed to have exactly one NUL byte, which is at the end.
CString
An owned string that is guaranteed to have exactly one NUL byte, which is at the end.
Formatter
Allows formatting of fmt::Arguments into a raw buffer.
RawFormatter
Allows formatting of fmt::Arguments into a raw buffer.

Enums§

CStrConvertError
Possible errors when using conversion functions in CStr.

Functions§

as_char_ptr_in_const_context
Returns a C pointer to the string.
kstrtobool
Convert common user inputs into boolean values using the kernel’s kstrtobool function.
kstrtobool_bytes
Convert &[u8] to bool by deferring to kernel::str::kstrtobool.