Livecode Wiki

Specifies whether comparisons treat uppercase and lowercase letters as different.

Syntax:

set the caseSensitive to {true | false}

Examples:

set the caseSensitive to true

Use the caseSensitive property to control the behavior of text comparisons.

The caseSensitive property controls the behavior of the all string comparisons, including the comparison operators =, >, < , >=, <=, is in, is among, is not among, and contains; the commands filter, find, and replace; and the functions offset, itemOffset, wordOffset, lineOffset, and replaceText.

If the caseSensitive property is set to true, all the LiveCode terms listed above, as well as all other string comparisons, treat uppercase and lowercase letters as different. For example, a search for "Apple" does not find the string "apple" or "APPLE", and the expression "APPLE" = "apple" evaluates to false.

If the caseSensitive is false, uppercase letters are treated as equal to their lowercase equivalents: a search for "Apple" finds strings such as "apple" or "APPLE" without paying attention to the case of each letter, and the expression "APPLE" = "apple" evaluates to true.

The caseSensitive also affects custom property names and array key names. If the caseSensitive is true, custom property names that differ only in the case of their letters are treated as different custom properties. If the caseSensitive is false, custom property names that differ only in letter case cannot be distinguished from each other. The same is true for the keys of array elements.

Since the caseSensitive is a local property, its value is reset to false when the current handler finishes executing. It retains its value only for the current handler, and setting it in one handler does not affect its value in other handlers it calls.

Messages, object names, and LiveCode terms are never treated as case-sensitive, even if the caseSensitive is set to true.

See also: reset (command), wordOffset (function), offset (function), lineOffset (function), replaceText (function), keys (function), itemOffset (function), contains (o (operator), is among (operator), is not among (o (operator), is in (operator), wholeMatches (property)