//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "CompareStr.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: CompareStr
// Routine: SysUtils.CompareStr

// BeginCode
/*
The following code compares String1, 'STEVE', to String2,
'STEVe'. Note that CompareStr returns a number less than 0
because the value of 'e' is greater than the value of 'E'.
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  AnsiString String1 = "STEVE";
  AnsiString String2 = "Steve";
  int I = CompareStr(String1, String2);  // the value of I is < 0
  Edit1->Text = IntToStr(I);
  if (I != 0)
	ShowMessage ("The strings are not equal");
}
// EndCode
// EndExample: CompareStr
//---------------------------------------------------------------------------
