ChemPal Documentation - v1.7.0
    Preparing search index...

    Variable SUBSCRIPTSConst

    SUBSCRIPTS: { [key: string]: string } = ...

    A mapping of regular characters to their Unicode subscript equivalents. Used for converting numbers and basic mathematical symbols to subscript format.

    Type declaration

    • [key: string]: string
    SUBSCRIPTS["2"] // Returns "â‚‚"
    SUBSCRIPTS["+"] // Returns "₊"

    // Usage in strings
    const formula = "H" + SUBSCRIPTS["2"] + "O" // Returns "Hâ‚‚O"
    export const SUBSCRIPTS: { [key: string]: string } = {
    /* tslint:disable */
    '0': '\u2080',
    '1': '\u2081',
    '2': '\u2082',
    '3': '\u2083',
    '4': '\u2084',
    '5': '\u2085',
    '6': '\u2086',
    '7': '\u2087',
    '8': '\u2088',
    '9': '\u2089',

    /* tslint:enable */
    } as const;