public function endsWith($string)
    {
        $string = static::convertString($string, $this->encoding);

        return $string === $this->substring($this->length() - mb_strlen($string, $this->encoding))->__toString();
    }