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 分解时间 �cdecodedate、decodetime … decodedatetime …

Delphi 屏蔽特殊字符

Delphi synedit的安装和基本使用

Delphi rest客户端程序

Delphi webbrowser多次执行documentcomplete

Delphi中设置系统时间方法

Delphi 保证当前程序显示在最前

Delphi动态分配指针长度

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



打赏

取消

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

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

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

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

评论

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