Crates.io | grapheme-picker |
lib.rs | grapheme-picker |
version | 0.1.0 |
source | src |
created_at | 2021-01-17 22:20:34.939819 |
updated_at | 2021-01-17 22:20:34.939819 |
description | Helps to pick part of words |
homepage | |
repository | https://github.com/ltruchot/rust_french-packages |
max_upload_size | |
id | 343296 |
size | 5,958 |
A Rust library to help users to get parts of words.
[dependencies]
grapheme-picker = "0.1.0"
use grapheme_picker::{take_last, take_lasts, drop_last, drop_lasts};
assert_eq!(take_last("tests"), "s");
assert_eq!(take_lasts("tests", 3), "sts");
assert_eq!(drop_last("tests"), "test");
assert_eq!(drop_lasts("tests", 3), "te");