Skip to main content

Module c_str

Module c_str 

1.88.0 ยท Source
Expand description

CStr and its related types.

Re-exportsยง

use crate::cmp::Ordering; ๐Ÿ”’
use crate::error::Error; ๐Ÿ”’
use crate::ffi::c_char; ๐Ÿ”’
use crate::intrinsics::const_eval_select; ๐Ÿ”’ Experimental
use crate::intrinsics::const_eval_select; ๐Ÿ”’ Experimental
use crate::iter::FusedIterator; ๐Ÿ”’
use crate::marker::PhantomData; ๐Ÿ”’
use crate::num::niche_types::UsizeNoHighBitMinusOne; ๐Ÿ”’ Experimental
use crate::ptr::NonNull; ๐Ÿ”’
use crate::slice::memchr; ๐Ÿ”’ Experimental
use crate::fmt; ๐Ÿ”’
use crate::ops; ๐Ÿ”’
use crate::range; ๐Ÿ”’
use crate::slice; ๐Ÿ”’
use crate::str; ๐Ÿ”’

Structsยง

CStr
A dynamically-sized view of a C string.
Display
Helper struct for safely printing a CStr with format! and {}.
FromBytesUntilNulError
An error indicating that no nul byte was present.
BytesExperimental
An iterator over the bytes of a CStr, without the nul terminator.

Enumsยง

FromBytesWithNulError
An error indicating that a nul byte was not in the expected position.

Functionsยง

strlen ๐Ÿ”’ โš Experimental
Calculate the length of a nul-terminated string. Defers to Cโ€™s strlen when possible.