Compare string ignorecase

Posted on 2007-07-27
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


Question by:elschott
    LVL 10

    Accepted Solution

       if SameText(mystring,textfield.text) then
             do something;

    Author Comment

    Best advice ever, simple once you know how
    LVL 1

    Expert Comment

    function AnsiCompareText ( const String1, String2 : string ) : Integer; // ignoring case

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    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 NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now