titlecaseSegment method

String titlecaseSegment(
  1. String s,
  2. Locale locale,
  3. TitlecaseOptions options
)

Returns the full titlecase mapping of the given string

The v1 refers to the version of the options struct, which may change as we add more options

See the Rust documentation for titlecase_segment for more information.

Implementation

String titlecaseSegment(String s, Locale locale, TitlecaseOptions options) {
  final temp = _FinalizedArena();
  final write = _Write();
  _icu4x_TitlecaseMapper_titlecase_segment_v1_mv1(_ffi, s._utf8AllocIn(temp.arena), locale._ffi, options._toFfi(temp.arena), write._ffi);
  return write.finalize();
}