compact_str icon indicating copy to clipboard operation
compact_str copied to clipboard

A memory efficient string type that can store up to 24* bytes on the stack

Results 34 compact_str issues
Sort by recently updated
recently updated
newest added

This issue for tracking the implementation of the [`from_utf16_lossy(...)`](https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf16_lossy) method that exists on `String`.

string API

[kani](https://github.com/model-checking/kani) can verify that `unsafe` code does not have: - Memory safety (e.g., null pointer dereferences) - User-specified assertions (i.e., assert!(...)) - The absence of panics (e.g., unwrap() on None...

With the recent advancements in const generics, it's theoretically possible to support a `CompactString` with a user defined size that is > 24, e.g. 32, 40, 48 bytes long. We...

Originally implemented in #118, it might be possible to improve the performance of the edge case when we have a `CompactString` > 16MB on 32-bit systems by re-using the already...

Having a mutable `CompactStr` is great since it can be a drop-in replacement of `String`. However, the original immutable `CompactStr` provides `O(1)` clone, which is super useful for immutable string,...

More documentation should added within the crate, to public methods on `CompactStr`, and to private method so the logic of how `Repr` works is clear

I was profiling something and noticed that `CompactString::clone` was hitting the allocator consistently even though the strings were small. Turns out that if you convert a String into CompactString using...