Function chompBase10

  • Skips number characters, a.k.a. any one of 1,2,3,4,5,6,7,8,9

    Example

    chompBase10(2, "aaaaaaaaaa1928a")  // => 2
    chompBase10(10, "aaaaaaaaaa1928a") // => 14

    Returns

    the new offset after "removing" all base 10 numbers

    Parameters

    • offset: number

      the offset to start looking from

    • string: string

      the source string

    Returns number