Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add unicode_word_indices#91

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

basile-henry
Copy link
Contributor

The PR adds a new iterator:UnicodeWordIndices (and the functionunicode_word_indices). It is similar toUnicodeWords but also provides byte offsets for each word.

The motivation for this PR was makingnushell/reedline#5 in which I usedsplit_word_bound_indices and then filtered the result using logic that is internal tounicode_words. I believe that PR would have been trivial usingunicode_word_indices. Hopefully it can also be useful to others.

Should I add more tests forunicode_word_indices? Or are the existing tests forunicode_words and the doc test forunicode_word_indices sufficient?

The iterator UnicodeWordIndices is similar to UnicodeWord but also provides byte offsets for each word
@Manishearth
Copy link
Member

Retriggering GHA

basile-henry reacted with thumbs up emoji

@ManishearthManishearth merged commitcea3ce6 intounicode-rs:masterMar 9, 2021
@basile-henrybasile-henry deleted the basile/unicode-word-indices branchMarch 9, 2021 06:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ManishearthManishearthManishearth approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@basile-henry@Manishearth

[8]ページ先頭

©2009-2025 Movatter.jp