public function endsWith($suffix)
    {
        return $suffix === ''
        || $suffix === mb_substr(
            $this->contents,
            -strlen((string) $suffix),
            null,
            $this->encoding
        );
    }