Back to Strings
startswith
Test if a string starts with a prefix.
Syntax
startswith(s, prefix) → true if s starts with prefix
Backends
TypeScript
Description
Test if a string starts with a prefix.
Parameters
| Name | Description |
|---|---|
| s | Input string |
| prefix | Prefix to test |
Returns
true if s starts with prefix