PluralOperands.fromString constructor
- String s
Construct for a given string representing a number
See the Rust documentation for from_str
for more information.
Throws FixedDecimalParseError on failure.
Implementation
factory PluralOperands.fromString(String s) {
final temp = _FinalizedArena();
final result = _icu4x_PluralOperands_from_string_mv1(s._utf8AllocIn(temp.arena));
if (!result.isOk) {
throw FixedDecimalParseError.values[result.union.err];
}
return PluralOperands._fromFfi(result.union.ok, []);
}