public static function endsWith(string $subject, string $search, bool $caseSensitive = true): bool
    {
        if (! $caseSensitive) {
            $subject = mb_strtolower($subject);
            $search = mb_strtolower($search);
        }

        return $search === '' || mb_substr($subject, -mb_strlen($search)) === $search;
    }
public static function endsWith(string $subject, string $search, bool $caseSensitive = true): bool
    {
        if (! $caseSensitive) {
            $subject = mb_strtolower($subject);
            $search = mb_strtolower($search);
        }

        return $search === '' || mb_substr($subject, -mb_strlen($search)) === $search;
    }
public static function endsWith ( string $ subject , string $ search , bool $ caseSensitive = true ) : bool { if ( ! $ caseSensitive ) { $ subject = mb_strtolower ( $ subject ) ; $ search = mb_strtolower ( $ search ) ; } return $ search === '' || mb_substr ( $ subject , - mb_strlen ( $ search ) ) === $ search ; }
Returns whether the subjects ends with the search string.
Returns whether the subjects ends with the search string .