Returns true if the pattern matches the end of the source.
Parameters
source: string
pattern: string
Returns boolean
escapeRegExp
escapeRegExp(source: string): string
Escapes a RegExp sequence.
Parameters
source: string
Returns string
format
format(source: string, ...args: any[]): string
Takes any arg
Parameters
source: string
Rest...args: any[]
Returns string
fromChars
fromChars(ch: number, count: number): string
fromChars(chars: number[]): string
Parameters
ch: number
count: number
Returns string
Parameters
chars: number[]
Returns string
getHashCode
getHashCode(source: string): number
Returns a numerical (integer) hash code of the string. Can be used for identifying inequality of contents, but two different strings in rare cases will have the same hash code.
This takes a string and replaces '{string}' with the respected parameter.
Also allows for passing an array in order to use '{n}' notation.
Not limited to an array's indexes. For example, {length} is allowed.
Based upon Crockford's supplant function.
Returns true if the pattern matches the end of the source.