Difference between CompareStr and '=' for Strings in Delphi

Viewed 48791

I just want to know the difference between CompareStr and = for comparing strings in Delphi. Both yield the same result.

if(str2[i] = str1[i]) then
  ShowMessage('Palindrome')

if(CompareStr(str2[i], str1[i]) = 0) then
  ShowMessage('Palindrome')

Both show message Palindrome.

4 Answers
Related