starts with
checks if a string starts with a given prefix
(string subject, string prefix) -> boolean
Returns true
if subject
starts with prefix
. Returns false
otherwise.
Returns nil
if any argument is nil
.
Returns true
for any non-nil subject
if prefix
is the empty string.
Parameters
Name | Type | Description |
---|---|---|
subject |
string | The string to inspect |
prefix |
string | The prefix to check for |