-
Notifications
You must be signed in to change notification settings - Fork 56
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
There is no type that provides a guarantee of having only one grapheme inside. #141
Comments
For what reason would such a type be useful? This guarantee doesn't hold across Unicode versions, so it's a bit tenuous. |
This is not a Unicode guarantee, it is a guarantee of your iterator, its description says that it iterates over graphemes, hence
|
Yes, but which strings are graphemes changes with Unicode versions: a crate providing I'd recommend crates which wish to provide such functionality define their own grapheme type and wrap it, and we can merge the impls in the future if folks really want to. |
This type could be an
Iterator::Item
forGraphemes
, and could also have specific methods similar to those ofchar
, such asis_ascii
. ReplacingIterator::Item
now required breaking backwards compatibility. However, the very introduction of this type, even without replacement, would have been useful. As it would have become a single standard for such a guarantee and many traits of unrelated crates would have been implemented for it.Suggested title: `Grapheme'.
The text was updated successfully, but these errors were encountered: