public function beginsWith($prefix)
    {
        return $prefix === ''
        || mb_strpos(
            $this->contents,
            (string) $prefix,
            null,
            $this->encoding
        ) === 0;
    }