- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi str1.Compare 比较两个字符是否相同
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
var
str1:string ='a1232';
str2:string ='a1232';
begin
try
if str1.Compare(str1, str2)=0 then
begin
write('相同');
end
else
begin
write('不相同');
end;
readln;
{ TODO -oUser -cConsole Main : Insert code here www.delphitop.com }
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.