@openvanilla/mcbopomofoweb
    Preparing search index...

    Converts Arabic numerals into the traditional Suzhou (蘇州碼子) numeral form.

    Suzhou numerals are widely used in contexts such as restaurant receipts and traditional marketplaces. The converter outputs the vertical counting-rod shapes and, when appropriate, appends the positional marker line plus an optional unit label.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Generates a Suzhou numeral representation for the supplied number parts.

      The converter supports mixed vertical/“horizontal” glyph alternation that emulates handwritten Suzhou numerals. When preferInitialVertical is true, the first eligible digit (1–3) uses a vertical rod character (, , ); subsequent eligible digits flip between the vertical and horizontal variants to match customary writing. Callers can supply a unit suffix such as "元" to append after the positional marker line.

      Parameters

      • intPart: string

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

      • decPart: string

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

      • unit: string = ""

        Optional unit string appended after the place marker.

      • preferInitialVertical: boolean = true

        Toggles the initial orientation for digits 1–3.

      Returns string

      A formatted Suzhou numeral, optionally including a newline before the place marker.

      const receipt = SuzhouNumbers.generate("123", "", "元");
      // receipt === "〡二〣\n百元"