[−][src]Crate null_terminated
Library of null-terminated slices and UTF-8-encoded strings, references to which are thin pointers for efficiency and ease of use with FFI.
A likely common use case is C FFI, for example:
extern "C" { fn strlen(_: &Nul<u8>) -> usize; fn strchr(_: &Nul<u8>, _: c_int) -> &Nul<u8>; }
For further examples, see the docs of Nul
.
Macros
str0 | Make a static |
str0_utf8 | Make a static |
Structs
CharIndices | Iterator over the characters of a null-terminated string and their byte positions |
Chars | Iterator over the characters of a null-terminated string |
Iter | Iterator over the elements of a null-terminated array |
IterMut | Iterator over the elements of a mutable null-terminated array |
Nul | Generic unsized null-terminated array |
NulStr | Null-terminated UTF-8 encoded string |