startsWith() public static method
Check if given string starts with specified substring.
Binary and multibyte safe.
public static boolean startsWith ( $string, $with, $caseSensitive = true ) | ||
---|---|---|
$string | string |
Input string |
$with | string |
Part to search inside the $string |
$caseSensitive | boolean |
Case sensitive search. Default is true. When case sensitive is enabled, $with must exactly match the starting of the string in order to get a true value. |
return | boolean |
Returns true if first input starts with second input, false otherwise |
Please login to continue.