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
Post a Comment