JapaneseCardinalCodec class final
Converts integers to and from Japanese cardinal numerals.
Formatting emits normalized kanji numerals and omits implied zeros, such as
百一 for 101 and 一万一 for 10001. Parsing accepts common zero markers
and formal digit variants while preserving the same additive semantics.
Constructors
- JapaneseCardinalCodec()
-
Creates a Japanese cardinal codec.
const
Properties
-
decoder
→ Converter<
String, int> -
Converts display strings into numeric values.
no setterinherited
-
encoder
→ Converter<
int, String> -
Converts numeric values into display strings.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inverted
→ Codec<
String, int> -
Inverts
this.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
String encoded) → int -
Alias for parse.
inherited
-
encode(
int input) → String -
Alias for format.
inherited
-
format(
num value) → String -
Formats
valueinto a display string.override -
fuse<
R> (Codec< String, R> other) → Codec<int, R> -
Fuses
thiswithother.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String input) → int -
Parses
inputand returns the numeric value.override -
toString(
) → String -
A string representation of this object.
inherited
-
tryParse(
String input) → int? -
Parses
input, returningnullinstead of throwing FormatException.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited