endsWith()

Determines whether a string ends with the characters of a specified string.

This function is valid in v2.13.0 to v2.24.3. This function has been downloaded 62 times.

Parameters

{string} string
The string that will be searched.
{string} target
The characters to be searched for at the end of string.
{number=} opt_length Optional, Default:string.length
If provided it is used as the length of string. If omitted, the default value is the length of string.

Returns

{boolean}
A boolean value indicating whether or not target is found at the end of string.