Skip to content

add utf8proc_iterate_graphemes#213

Open
niblo wants to merge 1 commit intoJuliaStrings:masterfrom
niblo:grapheme-iterator
Open

add utf8proc_iterate_graphemes#213
niblo wants to merge 1 commit intoJuliaStrings:masterfrom
niblo:grapheme-iterator

Conversation

@niblo
Copy link
Copy Markdown

@niblo niblo commented Jan 4, 2021

Wondering if you're interested in this, or at least as a starting point. The tests pass, but I expect faults to be found if you take a look.

@stevengj
Copy link
Copy Markdown
Member

stevengj commented Jan 4, 2021

It's an interesting idea, but I wonder if it would be better to simply put an example of a loop over graphemes into the manual?

@niblo
Copy link
Copy Markdown
Author

niblo commented Jan 4, 2021

I think it's a great idea, but only probably because that's what I need. It's convenient to have it tested and ready to use.

const utf8proc_uint8_t *str, utf8proc_int32_t *read_bytes, utf8proc_ssize_t strlen,
utf8proc_uint32_t *start, utf8proc_uint32_t *end
) {
int n, break_state = 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n should be a utf8proc_ssize_t.
break_state should be a utf8proc_int32_t .

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.

3 participants