зеркало из https://github.com/mozilla/gecko-dev.git
b93bf873ba | ||
---|---|---|
.. | ||
src | ||
.cargo-checksum.json | ||
CHANGELOG.md | ||
Cargo.toml | ||
LICENSE | ||
README.md |
README.md
String
A UTF-8 encoded string with configurable byte storage.
Usage
To use string
, first add this to your Cargo.toml
:
[dependencies]
string = "0.1"
Next, add this to your crate:
extern crate string;
use string::{String, TryFrom};
let s: String<[u8; 2]> = String::try_from([b'h', b'i']).unwrap();
assert_eq!(&s[..], "hi");
See documentation for more details.