string

Crates.iostring
lib.rsstring
version0.3.1
sourcesrc
created_at2017-07-25 19:44:21.614062
updated_at2024-09-13 16:14:11.884955
descriptionA UTF-8 encoded string with configurable byte storage.
homepagehttps://github.com/carllerche/string
repositoryhttps://github.com/carllerche/string
max_upload_size
id25058
size14,339
Team algorithmia (github:algorithmiaio:team-algorithmia)

documentation

https://docs.rs/string/0.3.1/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.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.

Commit count: 24

cargo fmt