Skip to main content

Module converts

Module converts 

Source
Expand description

Ways to create a str from bytes slice.

Re-exportsยง

use super::Utf8Error; ๐Ÿ”’
use super::validations::run_utf8_validation; ๐Ÿ”’
use crate::mem; ๐Ÿ”’
use crate::ptr; ๐Ÿ”’

Functionsยง

from_utf8
Converts a slice of bytes to a string slice.
from_utf8_mut
Converts a mutable slice of bytes to a mutable string slice.
from_utf8_uncheckedโš 
Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8.
from_utf8_unchecked_mutโš 
Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8; mutable version.
from_raw_partsโš Experimental
Creates a &str from a pointer and a length.
from_raw_parts_mutโš Experimental
Creates a &mut str from a pointer and a length.