icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Add WordBreakIterator::with_status

Open eggrobin opened this issue 2 years ago • 3 comments

Fix #3277.

Use it to make the example slightly more hinged.

eggrobin avatar Apr 11 '23 12:04 eggrobin

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.

sffc avatar Apr 11 '23 16:04 sffc

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

sffc avatar May 11 '23 17:05 sffc

Ping @eggrobin, can you rename the function as suggested above?

sffc avatar Feb 08 '24 16:02 sffc

Renamed and added is_word_like to the enumeration type.

eggrobin avatar Feb 28 '24 15:02 eggrobin

Changelog?

sffc avatar Mar 04 '24 03:03 sffc