utf8_slice

Crates.ioutf8_slice
lib.rsutf8_slice
version1.0.0
sourcesrc
created_at2020-11-21 20:14:52.330523
updated_at2020-11-21 20:14:52.330523
descriptionLightweight UTF8 Slice Utilities
homepagehttps://github.com/coastalwhite/utf8_slice
repositoryhttps://github.com/coastalwhite/utf8_slice.git
max_upload_size
id314794
size7,211
Gijs Burghoorn (coastalwhite)

documentation

README

UTF8 Slice

A lightweight heapless way to do slicing on unicode strings in Rust.

What does the library provide

This library provides 4 utility functions to deal with unicode slices.

utf8_slice::slice(s: &str, begin: usize, end: usize) -> &str

This will do the same as &s[begin..end], but now taking into account utf8 characters.

utf8_slice::from(s: &str, begin: usize) -> &str

This will do the same as &s[begin..], but now taking into account utf8 characters.

utf8_slice::till(s: &str, end: usize) -> &str

This will do the same as &s[..end], but now taking into account utf8 characters.

utf8_slice::len(s: &str) -> usize

This will do the same as s.len(), but now taking into account utf8 characters.

Documentation

Link to Documentation

License

MIT

Commit count: 3

cargo fmt