Wikia

Delphi Programming

AnsiSameText Routine

2,918pages on
this wiki
Talk0
This page is intended as a supplement to the official documentation on Delphi programming. CodeGear is in the process of putting the Delphi documentation on the Web. Once they have done so, this page will link to the relevant page in the official documentation.
Stub
This article is a stub.
Please help enhance the Delphi Programming Wiki by expanding it.
Info
see the VCL Documentation Guidelines for an overview on doc pages

UnitEdit

DescriptionEdit

Definition (Delphi 6):

function AnsiSameText(const S1, S2: string): Boolean;

Definition (Delphi 2009, 2010):

function AnsiSameText(const S1, S2: string): Boolean; inline; overload;

Technical CommentsEdit

(Known issues / Documentation clarifications / Things to be aware of)

ExamplesEdit

var
  StringA, StringB: string;
begin
  StringA := 'Natal';
  StringB := 'nATAL';
  if AnsiSameText(StringA, StringB) then
    ShowMessage('The text in stringA is the same as the text in stringB.') //<== this will be shown
  else
    ShowMessage('The text in stringA is not the same as the text in stringB.');

  StringA := 'Natal';
  StringB := 'Natal';
  if AnsiSameText(StringA, StringB) then
    ShowMessage('The text in stringA is the same as the text in stringB.') //<== this will be shown
  else
    ShowMessage('The text in stringA is not the same as the text in stringB.');

  StringA := 'Natal';
  StringB := 'Natala';
  if AnsiSameText(StringA, StringB) then
    ShowMessage('The text in stringA is the same as the text in stringB.')
  else
    ShowMessage('The text in stringA is not the same as the text in stringB.');  //<== this will be shown

See AlsoEdit

User Comments/TipsEdit

(Please leave your name with your comment.)

Around Wikia's network

Random Wiki