Hướng dẫn str_starts_with php
(PHP 8) str_starts_with — Checks if a string starts with a given substring Descriptionstr_starts_with(string Parametershaystack The string to search in. needle The substring to search for in the Return Values Returns ExamplesExample #1 Using the empty string
The above example will output: All strings start with the empty string Example #2 Showing case-sensitivity
str_starts_with($string, 'The')) { The above example will output: The string starts with 'The' "the" was not found because the case does not match Notes
See Also
Paul Phillips ¶ 1 year ago
jgusta ¶ 1 year ago
Reinder ¶ 10 months ago
|