StartsWith
Tests whether a string begins with a specified prefix.
Signature
StartsWith(string text, string prefix)
Parameters
- text (string): The string to test.
- prefix (string): The prefix to search for.
Returns
- boolean:
trueiftextstarts withprefix,falseotherwise.
Description
Uses String.StartsWith. The comparison is case-sensitive.
Examples
var a = StartsWith("Hello, World", "Hello")
# a = true
var b = StartsWith("Hello", "hello")
# b = false (case-sensitive)
var c = StartsWith("Hello", "")
# c = true (empty prefix matches any string)