icu4x
icu4x copied to clipboard
Add WordBreakIterator::with_status
Fix #3277.
Use it to make the example slightly more hinged.
We could also in the future add a .segments() function that returns Iterator<Item = &str> or similar.
I'm not sure if with_status / with_type is the best name. Maybe iter_with_word_type.
I lean toward holding off on these segmenter iterator adapters until after 1.2 so that we can have more time to bikeshed them.
Discussion: make the function named iter_with_word_type, and also add a getter to the WordType enum for is_word_like. None of this needs to be in FFI.
LGTM: @Manishearth @sffc @echeran
Ping @eggrobin, can you rename the function as suggested above?
Renamed and added is_word_like to the enumeration type.
Changelog?