LineSegmenter.autoWithOptions constructor

LineSegmenter.autoWithOptions(
  1. LineBreakOptions options, [
  2. Locale? contentLocale
])

Construct a LineSegmenter with custom options using compiled data. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.

See the Rust documentation for new_auto for more information.

Implementation

factory LineSegmenter.autoWithOptions(LineBreakOptions options, [Locale? contentLocale]) {
  final temp = _FinalizedArena();
  final result = _icu4x_LineSegmenter_create_auto_with_options_v2_mv1(contentLocale?._ffi ?? ffi.Pointer.fromAddress(0), options._toFfi(temp.arena));
  return LineSegmenter._fromFfi(result, []);
}