?
Solved

Compare string ignorecase

Posted on 2007-07-27
3
Medium Priority
?
7,672 Views
Last Modified: 2013-11-23
I have a string variable and a textfield component, I want to compare the contents of the string to the textfield.text value and check for equality but I want to ignorecase, so providing the letters are the same I don't care about the case.

if mystring = textfield.text then
 do something;

does anyone know the correct syntax to ignore the case

Thanks

Jake
0
Comment
Question by:elschott
3 Comments
 
LVL 10

Accepted Solution

by:
dinilud earned 2000 total points
ID: 19583626
   if SameText(mystring,textfield.text) then
         do something;
0
 

Author Comment

by:elschott
ID: 19583830
Best advice ever, simple once you know how
0
 
LVL 1

Expert Comment

by:huynhcaoky
ID: 20221098
function AnsiCompareText ( const String1, String2 : string ) : Integer; // ignoring case
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question