Created
November 4, 2022 20:34
-
-
Save mdebbar/aa7a7c6e32bee5d345ea709593cd638e to your computer and use it in GitHub Desktop.
JS API to be used with ICU4X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getLineBreaks(text) { | |
| // Returns a list of indices of line breaks in the | |
| // text along with the type of each break (soft or hard). | |
| } | |
| function getBidiRegions(text) { | |
| // Returns a list of BiDi regions, where each region contains: | |
| // 1. A range (start and end). | |
| // 2. BiDi level. | |
| } | |
| function getGraphemes(text) { | |
| // Returns a list of indices representing the end of each grapheme. | |
| } | |
| function getWords(text) { | |
| // Returns a list of indices representing the end of each word. | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment