Checks whether a string starts with a specified substring.
starts_with(x:string, prefix:string, [ignore_case=bool]) -> boolDescription
Section titled “Description”The starts_with function returns true if x starts with prefix and
false otherwise.
Set ignore_case=true to compare using full Unicode case folding instead of
case-sensitive matching.
Examples
Section titled “Examples”Check if a string starts with a substring
Section titled “Check if a string starts with a substring”from {x: "hello".starts_with("he")}{x: true}Compare case-insensitively
Section titled “Compare case-insensitively”from { ascii: "Get".starts_with("get", ignore_case=true), unicode: "STRASSE".starts_with("straße", ignore_case=true),}{ ascii: true, unicode: true,}