Expand description
A UTF-8–encoded, growable string.
This module contains the String type, the ToString trait for
converting to strings, and several error types that may result from
working with Strings.
§Examples
There are multiple ways to create a new String from a string literal:
You can create a new String from an existing one by concatenating with
+:
If you have a vector of valid UTF-8 bytes, you can make a String out of
it. You can do the reverse too.
Structs§
- Drain
- A draining iterator for
String. - From
Utf8 Error - A possible error value when converting a
Stringfrom a UTF-8 byte vector. - From
Utf16 Error - A possible error value when converting a
Stringfrom a UTF-16 byte slice. - String
- A UTF-8–encoded, growable string.
- Into
Chars Experimental - An iterator over the
chars of a string.
Traits§
- ToString
- A trait for converting a value to a
String.
Type Aliases§
- Parse
Error - A type alias for
Infallible.