combined_str
A no_std Rust library providing CombinedStr, a zero-copy, const-generic string combinator that holds N string slices and presents them as a single logical string — without allocating.
Features
no_stdcompatible — works in embedded and bare-metal environments- Zero-copy — holds
&strreferences, no heap allocation required allocfeature — enables conversion toStringandCow<str>, plus+=/+operators and equality comparisonsDisplay— prints all segments as one contiguous string- Iterator — iterate over the individual
&strsegments
Usage
[]
= "0.4"
use strs;
let s = strs!;
println!; // hello, world
assert_eq!;
Feature flags
| Flag | Default | Description |
|---|---|---|
alloc |
enabled | Enables String/Cow support via the alloc crate |
nightly |
disabled | Enables generic_const_exprs for CombinedStr<N> + CombinedStr<M> and CombinedStr<N> + &str |
License
MIT