Expand description
§Operations
Available operations for Str type are:
- Add (+)
- AddAssign (+=)
- Sub (-)
- SubAssign (-=)
- Mul (*)
- MulAssign (*=)
- Div (/)
- DivAssign (/=)
- Rem (%)
- RemAssign (%=)
§Add
The Add trait is used to add a string to another string or anything that implements the trait Display.
use strmath::Str;
let s = Str::from("Hello, ");
let x = Str::from("World!");
let y = s + x;
println!("{}", y.to_str());