@openvanilla/mcbopomofoweb
    Preparing search index...

    Converts Arabic numerals into spoken-style Chinese numerals.

    The conversion supports both lowercase (一二三…) and uppercase financial (壹貳參…) forms, and handles integral plus fractional parts supplied as decimal strings. All parameters accept ASCII digits so callers can feed parsed number parts without worrying about locale formatting.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Generates a Chinese numeral representation for the provided number parts.

      The method expects the integer and decimal portions of a number as digit strings. Leading zeros in the integer portion and trailing zeros in the decimal portion are trimmed automatically so callers can pass values extracted from user input without pre-processing.

      Parameters

      • intPart: string

        The integer component, e.g. "1024".

      • decPart: string

        The fractional component without the decimal point, e.g. "05".

      • numberCase: Case

        Selects the glyph set for output.

      Returns string

      The composed Chinese numeral, such as "一千零二十四點零五".

      ChineseNumbers.generate("2048", "", Case.lowercase); // "二千零四十八"