klyn.String.endsWith
method

    public endsWith(suffix as Object) as Boolean:

Description

Returns true if this string ends with the provided value.

When the value is a string, it is tested directly. When the value is a list, each item is tested as a candidate suffix.

Parameters

Parameter | Description
--- | ---
`suffix` | Suffix value or list of candidate suffixes.

Returns

True when at least one candidate matches.

Example

    assert "image.png".endsWith([".jpg", ".png", ".gif"])