We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb075f7 commit 99b3538Copy full SHA for 99b3538
Str.php
@@ -604,7 +604,7 @@ public static function snake($value, $delimiter = '_')
604
public static function startsWith($haystack, $needles)
605
{
606
foreach ((array) $needles as $needle) {
607
- if ((string) $needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) {
+ if ((string) $needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0) {
608
return true;
609
}
610
0 commit comments