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

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -