Crates.io | cbfr |
lib.rs | cbfr |
version | 0.1.6 |
source | src |
created_at | 2023-08-05 16:29:32.876542 |
updated_at | 2023-11-16 17:05:21.924726 |
description | A buffer that run on stack, focusing on performance and speed |
homepage | |
repository | https://github.com/purplebutt/rust-cbfr |
max_upload_size | |
id | 936570 |
size | 125,138 |
**A fast simple buffer running on stack, built on top of rust primitive array
Our links:
What's new in version 0.1.6
use cbfr::cb::BFRDYN;
let b256: BFRDYN<256> = "some string".into();
let b512: BFRDYN<512> = (&b256).into();
let b8: BFRDYN<8> = (&b256).into(); // will truncate "some string" to "some str"
assert_eq!("some string", b512.as_str());
assert_eq!("some str", b8.as_str());
What's new in version 0.1.5
"as_str" is replaceable by "as_ref()" but in some situation, "as_str" is very handy and can simplify our code, so we bring it back, it's no longer deprecated.
What's new in version 0.1.4..?
What's new in version 0.1.3..?
What's new in version 0.1.2..?
use cbfr::prelude::BFRDYN;
fn main() {
let mut b1:BFRDYN = "I love ..".into();
b1.reverse();
let v = b1.to_vec(' ');
println!("{}", b1);
println!("{:?}", v);
let mut b2: BFRDYN<512> = BFRDYN::new();
b2.append_str("coding!").unwrap();
println!("{}", b2);
let mut b3:BFRDYN = "cbr".into();
let b4:BFRDYN = "eda".into();
b3.append(b4).unwrap();
b3.sort();
println!("{}", b3);
}
If you have any suggestions, issues, feedback, or anything..? Send issues or feedback