tree: 3818265000c292636b6417b3eb3fd77d29aa9b91 [path history] [tgz]
  1. src/
  2. .cargo-checksum.json
  3. Cargo.toml
  4. CHANGELOG.md
  5. LICENSE
  6. README.md
third_party/rust_crates/vendor/string/README.md

String

A UTF-8 encoded string with configurable byte storage.

Build Status License: MIT Crates.io Documentation

Usage

To use string, first add this to your Cargo.toml:

[dependencies]
string = "0.1.3"

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.