Function isCharCode

  • Check if the character at the given offset has the given charcode.

    Example

       isCharCode(1,  97, "aaa")             // => true
    isCharCode(10, 97, "aaaaaaaaaaƤaaaa") // => false

    Returns

    true if the character at the given offset has the given code, otherwise false

    Parameters

    • code: number

      the character code to check against

    • offset: number

      the offset into the string

    • string: string

      the source string

    Returns boolean