klyn.String.startsWith
method

    public startsWith(prefix as Object) as Boolean:

Description

Returns true if this string starts 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 prefix.

Parameters

Parameter | Description
--- | ---
`prefix` | Prefix value or list of candidate prefixes.

Returns

True when at least one candidate matches.

Example

    assert "Hello World".startsWith(["Hi", "Hello"])