segmented_string

Crates.iosegmented_string
lib.rssegmented_string
version0.1.0
created_at2025-11-04 02:06:37.25853+00
updated_at2025-11-04 02:06:37.25853+00
descriptionan immutable string type built from array segments, similar to clojure's persistent vector, with unicode grapheme/width support
homepagehttps://code.lag.net/robey/segmented_string
repositoryhttps://code.lag.net/robey/segmented_string.git
max_upload_size
id1915553
size70,498
Robey Pointer (robey)

documentation

README

segmented_string

This library implements a replacement for String which uses multiple byte arrays (chunks of 128 bytes by default) as its backing store, instead of one long memory allocation. It also allows strings to be efficiently indexed and sliced as if they were arrays of grapheme clusters (which it calls "chars") while still storing them as UTF-8-encoded byte arrays. It's no_std compatible.

to-do

  • actual docs

License

This code is licensed under either the prosperity license (LICENSE-propserity.md) or the anti-capitalist license (LICENSE-anti-capitalist.txt) at your preference, for personal or non-commercial use.

Credit and blame: Robey Pointer robey@lag.net

Commit count: 0

cargo fmt