getForCldrString static method
- String s
Construct from a string in the format specified in TR35
See the Rust documentation for get_for_cldr_string
for more information.
See the Rust documentation for get_for_cldr_bytes
for more information.
Implementation
static PluralCategory? getForCldrString(String s) {
final temp = _FinalizedArena();
final result = _icu4x_PluralCategory_get_for_cldr_string_mv1(s._utf8AllocIn(temp.arena));
if (!result.isOk) {
return null;
}
return PluralCategory.values[result.union.ok];
}