Is the "Contains" Delphi string helper case sensitive? -


delphi xe3 introduced contains string helper function, help-file/wiki not state whether case sensitive or not?

yes case sensitive.

quick test:

showmessage('test'.contains('t').tostring(tuseboolstrs.true)); 

returns false


use tolowerinvariant or toupperinvariant compare case insensitive:

showmessage('test'.tolowerinvariant.contains('t').tostring(tuseboolstrs.true)); 

Comments

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -