src/Primitive/Support/Str.php
public static function startsWith($haystack, $needles, $caseSensitive = true)
    {
        $function = 'mb_stripos';

        if ($caseSensitive)
        {
            $function = 'mb_strpos';
        }

        foreach ((array) $needles as $needle)
        {
            if ($needle != '' && $function($haystack, $needle) === 0) return true;
        }

        return false;
    }
public static function startsWith($haystack, $needles, $caseSensitive = true)
    {
        $function = 'mb_stripos';

        if ($caseSensitive)
        {
            $function = 'mb_strpos';
        }

        foreach ((array) $needles as $needle)
        {
            if ($needle != '' && $function($haystack, $needle) === 0) return true;
        }

        return false;
    }
Determine if a given string starts with a given substring.

@param  string       $haystack
@param  string|array $needles
@param bool          $caseSensitive

@return bool