string

Crates.iostring
lib.rsstring
version0.3.0
sourcesrc
created_at2017-07-25 19:44:21.614062
updated_at2021-12-02 23:48:09.987418
descriptionA UTF-8 encoded string with configurable byte storage.
homepagehttps://github.com/carllerche/string
repositoryhttps://github.com/carllerche/string
max_upload_size
id25058
size13,792
Team algorithmia (github:algorithmiaio:team-algorithmia)

documentation

https://docs.rs/string/0.3.0/string/

README

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.3.0"

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.

Commit count: 24

cargo fmt