public function endsWith($needle, $caseSensitive = null)
    {
        if ('' === $needle) {
            return true;
        }
        if (null === $caseSensitive) {
            $caseSensitive = false;
        }

        $end = mb_substr($this->string(), -mb_strlen($needle));

        if ($caseSensitive) {
            return $end === $needle;
        }

        return mb_strtolower($end) === mb_strtolower($needle);
    }