TitlecaseMapper.withProvider constructor
TitlecaseMapper.withProvider(
- DataProvider provider
Construct a new TitlecaseMapper instance using a particular data source.
See the Rust documentation for new for more information.
Throws DataError on failure.
Implementation
factory TitlecaseMapper.withProvider(DataProvider provider) {
final result = _icu4x_TitlecaseMapper_create_with_provider_mv1(provider._ffi);
if (!result.isOk) {
throw DataError.values[result.union.err];
}
return TitlecaseMapper._fromFfi(result.union.ok, []);
}