1 unstable release

Uses old Rust 2015

0.1.0 Jun 23, 2017

#29 in #string-format


Used in 2 crates

MIT/Apache

125KB
2.5K SLoC

bstring

The bstring crate provides two types, bstr and BString, which implement str-like functions for byte strings with unknown encoding.

The bstring_macros crate provides the bformat! macro, which implements byte string formatting, similar to format!.

These types are intended to assist when implementing text-based protocols with no set character encoding.

bstring documentation

bstring_macros documentation

Building

To include bstring in your project, add the following to your Cargo.toml:

[dependencies]
bstring = "0.1"
bstring_macros = "0.1"

And the following to your crate root:

extern crate bstring;
#[macro_use] extern crate bstring_macros;

License

bstring is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.


lib.rs:

Byte string formatting and manipulation

This crate provides the types bstr and BString, which implement str-like functions for byte string values with unknown encoding.

These types are intended to assist when implementing text-based protocols with no set character encoding.

The bstring_macros crate provides formatting macros, similar to those found in the standard library for String values.

Dependencies