tree: 71c629e649690a48b44922e493291d75a98f5dc0 [path history] [tgz]
  1. .cargo-checksum.json
  2. CHANGELOG.md
  3. Cargo.toml
  4. LICENSE
  5. README.md
  6. src/
rustc_deps/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.2"

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.