DecomposingNormalizer.nfdWithProvider constructor

DecomposingNormalizer.nfdWithProvider(
  1. DataProvider provider
)

Construct a new DecomposingNormalizer instance for NFD using a particular data source.

See the Rust documentation for new_nfd for more information.

Throws DataError on failure.

Implementation

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