| @@ 4595-4609 (lines=15) @@ | ||
| 4592 | * |
|
| 4593 | * @return bool |
|
| 4594 | */ |
|
| 4595 | public static function str_istarts_with($haystack, $needle) |
|
| 4596 | { |
|
| 4597 | $haystack = (string)$haystack; |
|
| 4598 | $needle = (string)$needle; |
|
| 4599 | ||
| 4600 | if (!isset($haystack[0], $needle[0])) { |
|
| 4601 | return false; |
|
| 4602 | } |
|
| 4603 | ||
| 4604 | if (self::stripos($haystack, $needle) === 0) { |
|
| 4605 | return true; |
|
| 4606 | } |
|
| 4607 | ||
| 4608 | return false; |
|
| 4609 | } |
|
| 4610 | ||
| 4611 | /** |
|
| 4612 | * Limit the number of characters in a string, but also after the next word. |
|
| @@ 4881-4895 (lines=15) @@ | ||
| 4878 | * |
|
| 4879 | * @return bool |
|
| 4880 | */ |
|
| 4881 | public static function str_starts_with($haystack, $needle) |
|
| 4882 | { |
|
| 4883 | $haystack = (string)$haystack; |
|
| 4884 | $needle = (string)$needle; |
|
| 4885 | ||
| 4886 | if (!isset($haystack[0], $needle[0])) { |
|
| 4887 | return false; |
|
| 4888 | } |
|
| 4889 | ||
| 4890 | if (strpos($haystack, $needle) === 0) { |
|
| 4891 | return true; |
|
| 4892 | } |
|
| 4893 | ||
| 4894 | return false; |
|
| 4895 | } |
|
| 4896 | ||
| 4897 | /** |
|
| 4898 | * Get a binary representation of a specific string. |
|