1
0
Fork 0

Improve strStartsWith

pull/357/head
Rob Lourens 2017-06-07 11:37:45 -07:00
parent 70cf60e868
commit 829d3075f7
1 changed files with 1 additions and 1 deletions

View File

@ -174,5 +174,5 @@ function getVendorDir(\stdClass $composerJson = null): string
function strStartsWith(string $haystack, string $prefix): bool
{
return empty($prefix) || strpos($haystack, $prefix) === 0;
return substr($haystack, 0, strlen($prefix)) === $prefix;
}