ChineseRmbCodec class final

Converts RMB amounts to and from Simplified Chinese uppercase amount text.

Inheritance

Constructors

ChineseRmbCodec({String prefix = '人民币', String wholeSuffix = '整', bool writeWholeSuffixForJiao = false})
Creates a Simplified Chinese RMB amount codec.
const

Properties

decoder Converter<String, num>
Converts display strings into numeric values.
no setterinherited
encoder Converter<num, String>
Converts numeric values into display strings.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<String, num>
Inverts this.
no setterinherited
prefix String
Text written before the amount.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wholeSuffix String
Suffix written when the amount has no lower unit.
final
writeWholeSuffixForJiao bool
Whether wholeSuffix is written after exact jiao amounts.
final

Methods

decode(String encoded) num
Alias for parse.
inherited
encode(num input) String
Alias for format.
inherited
format(num value) String
Formats value into a display string.
override
fuse<R>(Codec<String, R> other) Codec<num, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String input) num
Parses input and returns the numeric value.
override
toString() String
A string representation of this object.
inherited
tryParse(String input) num?
Parses input, returning null instead of throwing FormatException.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited