Delphi XE3 introduced a Contains string helper function, but the help-file/wiki does not state whether it is case sensitive or not?
Yes it is case sensitive.
Quick test:
ShowMessage('TEST'.Contains('t').ToString(TUseBoolStrs.True));
returns False
Use ToLowerInvariant or ToUpperInvariant to compare case insensitive:
ShowMessage('TEST'.ToLowerInvariant.Contains('t').ToString(TUseBoolStrs.True));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With