Case sensitivity

From PEGWiki
Jump to: navigation, search

Case sensitivity occurs when data, particularly strings, which differ only in letter case, are considered different. An algorithm or function that exhibits case sensitivity is said to be case-sensitive; one that does not is said to be case-insensitive. For example, the Pascal compiler is case-insensitive, because every reserved word and every identifier may be typed in uppercase, lowercase, or mixed-case, with no difference whatsoever to the meaning. On the other hand, when Pascal compares strings encoded in ASCII, the strings 'a' and 'A' are considered to be unequal, with the latter being smaller, so we say that this comparison is case-sensitive.