Signature
bool str_starts_with(String haystack, String needle)
Parameters
haystack : string to inspect
needle : prefix to compare against the start of
haystackreturn value :
true when haystack begins with needle, otherwise falseChecks whether haystack starts with needle.
Example
print(str_starts_with("/doc", "/") ? "yes\n" : "no\n");
Output
yes