Module std::str::raw[src]

Unsafe operations

Functions

c_str_to_static_slice

Form a slice from a C string. Unsafe because the caller must ensure the C string has the static lifetime, or else the return value may be invalidated later.

from_buf_len

Create a Rust string from a *u8 buffer of the given length

from_byte

Converts a byte to a string.

from_c_str

Create a Rust string from a null-terminated C string

from_utf8

Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8.

from_utf8_owned

Converts an owned vector of bytes to a new owned string. This assumes that the utf-8-ness of the vector has already been validated

slice_bytes

Takes a bytewise (not UTF-8) slice from a string.

slice_unchecked

Takes a bytewise (not UTF-8) slice from a string.