View file vendor/php-curl-class/php-curl-class/src/Curl/StringUtil.php

File size: 364B
<?php

namespace Curl;

class StringUtil
{
    /**
     * Return true when $haystack starts with $needle.
     *
     * @access public
     * @param  $haystack
     * @param  $needle
     *
     * @return bool
     */
    public static function startsWith($haystack, $needle)
    {
        return \mb_substr($haystack, 0, \mb_strlen($needle)) === $needle;
    }
}