There are two ways to control case sensitivity in CSDL:
- The cs modifier
- The case switch
Both of these work at the operator level, giving you very fine control over the way your filters operate. The first example on this page uses a combination of a filter that is case sensitive and one that is not.
If you turn case sensitivity on, the CSDL engine will pay attention to the case of your argument. For example, if you filter for "Polish" with case sensitivy turned on, the engine will ignore "polish". If you turn case sensitivity off, the engine ignores the case of your argument.
Here's an example with the cs modifier:
interaction.content cs any "Apple,Google,Microsoft" and interaction.content any "operating system, os"
Alternatively, you can use the case switch. For example:
interaction.content contains [case(true)] "AbAbAb"
There are a few key points to keep in mind:
- Set case to "true" if you need your filter to be case sensitive.
- If you omit the case switch or if you set it to "false", the operator will treat uppercase and lowercase identically.
- If cs is present, the operator will use case-sensitive mode regardless of the setting of the case switch.