#string #append #concatenation #instantiation

yanked stringbuf

An efficient and easy-to-use library to append strings

Uses old Rust 2015

0.1.1 Feb 4, 2017
0.1.0 Feb 4, 2017

#14 in #instantiation

MIT license

4KB
80 lines

StringBuf

A nice and concise string concatenation library for the Rust language.

Preparation

Put this in your Cargo.toml:

[dependencies]
stringbuf = "0.1.0"

Usage

Instantiation:

extern crate stringbuf;

use stringbuf::StringBuf;

fn main() {
    let mut sb = StringBuf::from("Hello");
    sb = sb + " " + "world!";
    sb += " AddAssign works,";

    assert_eq!("Hello world! AddAssign works, as does appending by method.",
               *sb.append(" as does appending by method."));
}

No runtime deps