Module std::string
The string
module defines the String
type which represents UTF8 encoded
strings.
- Struct
String
- Constants
- Function
utf8
- Function
from_ascii
- Function
to_ascii
- Function
try_utf8
- Function
as_bytes
- Function
into_bytes
- Function
is_empty
- Function
length
- Function
append
- Function
append_utf8
- Function
insert
- Function
substring
- Function
index_of
- Function
internal_check_utf8
- Function
internal_is_char_boundary
- Function
internal_sub_string
- Function
internal_index_of
- Function
bytes
- Function
sub_string
use std::ascii;
use std::option;
use std::vector;
Struct String
A String
holds a sequence of bytes which is guaranteed to be in utf8
format.
public struct String has copy, drop, store
Constants
Index out of range.
const EInvalidIndex: u64 = 2;
An invalid UTF8 encoding.
const EInvalidUTF8: u64 = 1;