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.

相关阅读 >>

Delphi 去除右边指定字符

Delphi system.fillchar - 填充字节

Delphi 用firedac获取 sql server错误文本信息

Delphi 快速读取txt 指定行的数据

Delphi ifileoperation替换shfileoperation

Delphi setlength 内存释放总结

Delphi 实现数据库连接封装到dll

Delphi win32_diskdrive 硬盘 参数说明

Delphi 鼠标跟随代码

Delphi研究之驱动开发篇(六)--利用section与用户模式程

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...