I need to compare two AnsiStrings to see if they have the same text (ignoring case).
var
text1, text2: AnsiString;
begin
if SameText(text1, text2) then
...
In pre-Unicode Delphi I would use SameText function, but in modern Delphi there is only Unicode version of it, so I'm getting this warning: W1057 Implicit string cast from 'AnsiString' to 'string' upon call.
My question is, how to properly compare AnsiStrings in modern Delphi without getting compiler warnings (and without superfluously having to cast both strings to UnicodeString(text))
there it is. - TLamaAnsiStringvariables. - David Heffernan