Crates.io | cursor |
lib.rs | cursor |
version | 2.3.0 |
source | src |
created_at | 2021-12-18 21:41:07.682496 |
updated_at | 2022-01-05 15:57:23.095505 |
description | A more free Rust-Iterator. |
homepage | https://github.com/just-do-halee/cursor |
repository | https://github.com/just-do-halee/cursor |
max_upload_size | |
id | 500139 |
size | 201,035 |
CURSOR
A more free Rust-Iterator.
| Examples | Docs | Latest Note |
[dependencies]
cursor = "2"
# { version = "2", default-features = false } == no-std
use cursor::*;
fn example7() -> u8 {
let mut cursor = Cursor::new(&[1u8; 100]);
cursor += 5;
cursor -= 2;
cursor += 1;
cursor.current_deref()
}
fn example9() {
let mut cursor = StrCursor::new("test입니다. ^^");
cursor += 5;
assert_eq!(cursor.as_preserved_str(), "test입");
assert_eq!(cursor.current(), '니');
assert_eq!(cursor.as_remaining_str(), "다. ^^");
}