language property
Returns a string representation of Locale language.
See the Rust documentation for id
for more information.
Implementation
String get language {
final write = _Write();
_icu4x_Locale_language_mv1(_ffi, write._ffi);
return write.finalize();
}
Set the language part of the Locale.
See the Rust documentation for try_from_str
for more information.
Throws LocaleParseError on failure.
Implementation
set language(String s) {
final temp = _FinalizedArena();
final result = _icu4x_Locale_set_language_mv1(_ffi, s._utf8AllocIn(temp.arena));
if (!result.isOk) {
throw LocaleParseError.values[result.union.err];
}
}