Objective:
A collection of convenience functions, macros and traits to shorten repetitive code.
Status
passively-maintained
Version
0.2
Example 1:
Shorten the conversion to a String.
s!("Hello")
is the same as String::from("Hello"))
Example 2:
Concatenate two string(s) (slices) and return a string slice.
ss!("Hello", ", world")
is the same as "Hello, world";
The same macro works also with an arbitrary combination of String objects and string slices
extern crate shorten;
use *;
let s1 = s!;
let s2 = s!;
assert_eq!;
Example 3:
// #[macro_use] extern crate shorten;
extern crate shorten;
use *;
let s1 = s!;
let s2 = s!;
assert_eq!;