public static function contains($needle, $haystack, $caseSensitive = true)
    {
        if (!self::isValid($haystack)) {
            return false;
        }

        list($needle, $haystack) = self::transformCase($needle, $haystack, $caseSensitive);

        return (mb_strpos($haystack, $needle) !== false);
    }