Case-Sensitive
Case-sensitive means distinguishing between lowercase and uppercase characters. It is the opposite of case-insensitive, where the case of each letter is irrelevant. Case sensitivity has several applications in computer science, including matching and sorting textual data.
1. Matching
A text-based search may be either case-sensitive or case-insensitive. If a search function is case-sensitive, searching for "example" will not match "Example" and vice versa. If the function is case-insensitive, the two terms will match. Most search engines and search functions are case-insensitive, meaning uppercase and lowercase letters do not matter in the search keywords.
Case sensitivity also applies to authentication. When logging in to an app or website, the password is always case-sensitive. In other words, the login will fail if you enter "testpass" when the correct password is "TestPass". In most situations, the username is case-insensitive, though some logins require a username with the proper case.
2. Sorting
Like searching, most sorting algorithms are case-insensitive. However, some programs support case-sensitive sorting, meaning the letter case affects the order of the results. If a case-sensitive sorting algorithm uses each character's ASCII value, then all capital letters come before all lowercase characters. In an ASCII-based sort, T comes before t, and also before a, b, c, etc. Other case-sensitive algorithms may only prioritize capital letters before their lowercase counterparts. So T would come before t, but after a, b, c, etc.