[src]

Module std::str::raw

Unsafe operations

as_owned_vec

Access the str in its vector representation. The caller must preserve the valid UTF-8 property when modifying.

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

pop_byte

Removes the last byte from a string and returns it. Returns None when an empty string is passed. The caller must preserve the valid UTF-8 property.

push_byte

Appends a byte to a string. The caller must preserve the valid UTF-8 property.

push_bytes

Appends a vector of bytes to a string. The caller must preserve the valid UTF-8 property.

shift_byte

Removes the first byte from a string and returns it. Returns None when an empty string is passed. The caller must preserve the valid UTF-8 property.

slice_bytes

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

slice_unchecked

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