startsWith
Returns true if the first argument starts with the prefix specified
in the second argument.
Any data type can be used. Types other than string are converted to string before the function is applied. If the first argument is in bytes, the second one should be in bytes or a hex string with the prefix 0x or 0X.
Arguments
- Input string.
- Prefix.
Examples
Expression | Result |
---|---|
startsWith("Hello World!", "Hello") | true |