public function startsWith($string, $search, $position = null)
    {
        $position = $position !== null ? $position : 0;
        return mb_strpos((string)$string, $search, null, 'UTF-8') === $position;
    }
public function startsWith($string, $search, $position = null)
    {
        $position = $position !== null ? $position : 0;
        return mb_strpos((string)$string, $search, null, 'UTF-8') === $position;
    }
public function startsWith ( $ string , $ search , $ position = null ) { $ position = $ position !== null ? $ position : 0 ; return mb_strpos ( ( string ) $ string , $ search , null , 'UTF-8' ) === $ position ; }
Test if a string starts with the given search string

Examples::

String.startsWith('Hello world!', 'Hello') == true
String.startsWith('My hovercraft is full of...', 'Hello') == false
String.startsWith('My hovercraft is full of...', 'hovercraft', 3) == true

@param string $string The input string
@param string $search The string to search for
@param integer $position The position to test (defaults to the beginning of the string)
@return boolean
Test if a string starts with the given search string