| Crates.io | segmented_string |
| lib.rs | segmented_string |
| version | 0.1.0 |
| created_at | 2025-11-04 02:06:37.25853+00 |
| updated_at | 2025-11-04 02:06:37.25853+00 |
| description | an immutable string type built from array segments, similar to clojure's persistent vector, with unicode grapheme/width support |
| homepage | https://code.lag.net/robey/segmented_string |
| repository | https://code.lag.net/robey/segmented_string.git |
| max_upload_size | |
| id | 1915553 |
| size | 70,498 |
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.
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