University of Lethbridge - CPSC
caseInsensitiveCompare()
Assignment 1 - Movie2 - SM 25What is this function?
This function is a custom comparator. We give it to std::sort() to control how the movies are sorted alphabetically, without caring about uppercase or lowercase letters.
By default, sort() is case-sensitive. That means it would sort "Batman" before "avengers" just because capital letters come before lowercase letters in C++.
Members only
Keep reading this lesson
You've reached the end of the free preview. Unlock the rest of this lesson plus 27 more lessons in University of Lethbridge - CPSC.
- Unlimited coding questions
- Unlimited access to all classroom material
- Weekly live call for questions and guidance
- 3,000 AI tutor tokens / month
- Personal SQL database (3 MB)
- Progress tracking
Cancel any time.