cursor

Crates.iocursor
lib.rscursor
version2.3.0
sourcesrc
created_at2021-12-18 21:41:07.682496
updated_at2022-01-05 15:57:23.095505
descriptionA more free Rust-Iterator.
homepagehttps://github.com/just-do-halee/cursor
repositoryhttps://github.com/just-do-halee/cursor
max_upload_size
id500139
size201,035
Doha Lee (just-do-halee)

documentation

https://docs.rs/cursor

README

CURSOR Cursor logo

A more free Rust-Iterator.

CI Crates.io Licensed Twitter

| Examples | Docs | Latest Note |

[dependencies]
cursor = "2"
# { version = "2", default-features = false } == no-std

Cursor diagram

Examples

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(), "다. ^^");

}

Please check the examples folder for detailed features.

Commit count: 9

cargo fmt