ComposingNormalizer.nfkcWithProvider constructor

ComposingNormalizer.nfkcWithProvider(
  1. DataProvider provider
)

Construct a new ComposingNormalizer instance for NFKC using a particular data source.

See the Rust documentation for new_nfkc for more information.

Throws DataError on failure.

Implementation

factory ComposingNormalizer.nfkcWithProvider(DataProvider provider) {
  final result = _icu4x_ComposingNormalizer_create_nfkc_with_provider_mv1(provider._ffi);
  if (!result.isOk) {
    throw DataError.values[result.union.err];
  }
  return ComposingNormalizer._fromFfi(result.union.ok, []);
}