pub unsafe fn fz_string_clone_with_len(
buf: *const c_char,
len: usize,
) -> fz_string_t
Expand description
Create a new fz_string_t
containing the given string with the given length. This allows creation
of strings containing embedded NUL characters. As with fz_string_clone
, the resulting
fz_string_t
is independent of the passed buffer.
The given length should not include any NUL terminator. The given length must be less than half the maximum value of usize.
ยงSafety
The given pointer must not be NULL.
The resulting fz_string_t
must be freed.
fz_string_t fz_string_clone_with_len(const char *ptr, usize len);