segment method

SentenceBreakIteratorUtf16 segment(
  1. String input
)

Segments a string.

Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.

See the Rust documentation for segment_utf16 for more information.

Implementation

SentenceBreakIteratorUtf16 segment(String input) {
  final inputArena = _FinalizedArena();
  // This lifetime edge depends on lifetimes: 'a
  core.List<Object> aEdges = [this, inputArena];
  final result = _icu4x_SentenceSegmenter_segment_utf16_mv1(_ffi, input._utf16AllocIn(inputArena.arena));
  return SentenceBreakIteratorUtf16._fromFfi(result, [], aEdges);
}