This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In progress development of the roblox utf8 library.
utf8.char is fully feature-complete, unless there are special behaviors for when multiple numbers are passed in besides just concatenating them, which I doubt
rbxUTF8.graphemes
is almost there. I just need to figure out when theutf8.grapheme
iterator grabs 2 (or more?) matches instead of just 1. (are they called "surrogate pairs"?)i
andj
parameters are unused, but that behavior should be easy to reproduce once the rest of the logic is thererbxUTF8.codes
is a stub. One should note, although this is not currently in the current version of the script, thatrbxUTF8.codes
is more like the Luapairs
ornext
iterators, and it requires the string and previous return value in order to grab the next. For that reason, maybe it shouldn't use a coroutine.rbxUTF8.graphemes
, on the other hand, holds state internally and does not require that you continually pass in arguments to spit out the next set.Note: I copied the temporary tests from the linked repo towards the bottom.