Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #297 Sort a list of strings, case-insensitively

Sort the string list data in a case-insensitive manner.

The sorting must not destroy the original casing of the strings.

data.sort((a, b) => a.toUpperCase().compareTo(b.toUpperCase()));

New implementation...