/*
StrIComp example
The following example uses two edit controls and a button on a form. When the button is clicked, the text in the edit controls is compared case-insensitively.
VCL example:
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  char* szResult = new char[Edit1->Text.Length() + Edit2->Text.Length() + 20];
  int iResult = StrIComp(Edit1->Text.c_str(), Edit2->Text.c_str());

  StrCopy(szResult, Edit1->Text.c_str());
  if (iResult < 0)
    StrCat(szResult, " is less than ");
  else if (iResult > 0)
    StrCat(szResult, " is greater than ");
  else
    StrCat(szResult, " is equal to ");
  StrCat(szResult, Edit2->Text.c_str());
  ShowMessage(AnsiString(szResult));

  delete [] szResult;
}
 
