Atom

text.starts()

Tests a literal prefix.

Signature

text.starts(value, prefix)

Parameters

Two text values. The prefix may be empty.

Returns

Boolean.

Behavior

Compares UTF-8 bytes.

Errors

Invalid argument type.

Example

Atom
use text
assert(text.starts('café', 'ca'))