public function startsWith($pattern)
    {
        return (substr($this->string, 0, strlen($pattern)) == $pattern) ? true : false;
    }
public function startsWith($pattern)
    {
        return (substr($this->string, 0, strlen($pattern)) == $pattern) ? true : false;
    }
Returns true if the string starts with $pattern.

@param  string $pattern
@return boolean