uce/site/doc/pages/str_starts_with.txt
2026-06-16 12:21:31 +00:00

18 lines
372 B
Plaintext

:sig
bool str_starts_with(String haystack, String needle)
:params
haystack : string to inspect
needle : prefix to compare against the start of `haystack`
return value : `true` when `haystack` begins with `needle`, otherwise `false`
:see
>string
:content
Checks whether `haystack` starts with `needle`.
:example
print(str_starts_with("/doc", "/") ? "yes\n" : "no\n");