Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'UTF8Array' to the standard library #1062

Merged
merged 9 commits into from
Oct 5, 2023
Merged

Add 'UTF8Array' to the standard library #1062

merged 9 commits into from
Oct 5, 2023

Conversation

kyouko-taiga
Copy link
Contributor

UTF8Array is designed to be the internal representation of String. Implementation details are documented in the sources. The purpose of the inline and unowned storage representations is to have a way to for the compiler to generate static instances of String eventually.

The proposed implementation doesn't support mutable operations yet (e.g., appending). My goal is to extend this type so that it can be used as a drop-in replacement for Array<Int8>.

The current implementation of `UTF8Array` can't be compiled in no-std
mode because it uses `PointerToMutable.deallocate`.
@kyouko-taiga kyouko-taiga merged commit d44becd into main Oct 5, 2023
10 checks passed
@kyouko-taiga kyouko-taiga deleted the utf8-array branch October 5, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant