src/StringBuilder.php
public function startsWith($string)
    {
        $string = static::convertString($string, $this->encoding);

        return $string === $this->substring(0, (mb_strlen($string, $this->encoding) - 1))->__toString();
    }
public function startsWith($string)
    {
        $string = static::convertString($string, $this->encoding);

        return $string === $this->substring(0, (mb_strlen($string, $this->encoding) - 1))->__toString();
    }
Check if this sequence starts with a given string.

@param string $string The sequence to search for.

@return bool