| Crates.io | utf8_slice |
| lib.rs | utf8_slice |
| version | 1.0.0 |
| created_at | 2020-11-21 20:14:52.330523+00 |
| updated_at | 2020-11-21 20:14:52.330523+00 |
| description | Lightweight UTF8 Slice Utilities |
| homepage | https://github.com/coastalwhite/utf8_slice |
| repository | https://github.com/coastalwhite/utf8_slice.git |
| max_upload_size | |
| id | 314794 |
| size | 7,211 |
A lightweight heapless way to do slicing on unicode strings in Rust.
This library provides 4 utility functions to deal with unicode slices.
utf8_slice::slice(s: &str, begin: usize, end: usize) -> &strThis will do the same as &s[begin..end], but now taking into account utf8 characters.
utf8_slice::from(s: &str, begin: usize) -> &strThis will do the same as &s[begin..], but now taking into account utf8 characters.
utf8_slice::till(s: &str, end: usize) -> &strThis will do the same as &s[..end], but now taking into account utf8 characters.
utf8_slice::len(s: &str) -> usizeThis will do the same as s.len(), but now taking into account utf8 characters.
MIT