Function consumeBase16

  • Consume all characters in base 16.

    Example

    consumeBase16(0, "ABCDEF0123456789")
    // => [16, 12379813738877118000]
    consumeBase16(3, "åäöABCDEF!StopABCDEF")
    // => [9, 11259375]

    Returns

    a new offset and the consumed number converted to base 10

    Parameters

    • offset: number

      where in the string to start consuming

    • string: string

      the source string

    Returns [number, number]