strcursor

Crates.iostrcursor
lib.rsstrcursor
version0.2.5
sourcesrc
created_at2015-06-22 15:03:27.571897
updated_at2017-03-20 04:49:17.779918
descriptionProvides a string cursor type for seeking through a string whilst respecting grapheme cluster and code point boundaries.
homepage
repositoryhttps://github.com/DanielKeep/strcursor
max_upload_size
id2446
size77,794
way-cooler-devel (github:immington-industries:way-cooler-devel)

documentation

https://docs.rs/strcursor/0.2.5/strcursor/index.html

README

strcursor

Note: This is something of a work-in-progress. It has tests, but hasn't been exhaustively vetted.

This crate provides a "cursor" type for string slices. It provides the ability to safely seek back and forth through a string without worrying about producing invalid UTF-8 sequences, or splitting grapheme clusters.

In addition, it provides types to represent single grapheme clusters (Gc) and GcBuf) as distinct from arbitrary string slices.

See the StrCursor type for details.

Links

Compatibility

strcursor is currently supported on rustc version 1.1.0 and higher.

  • rustc < 1.4 will use a larger, less space-efficient implementation of GcBuf; rather than being the same size as Box<str>, it will be the same size as String.

  • rustc < 1.1 is not supported, due to a mysterious compiler crash.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

Commit count: 40

cargo fmt