用百分比比较两个字符串(彼此之间有多少相似度)返回byte类型,从0到100%functionCompareStringsInPercent(S…
procedureTForm1.Button1Click(Sender:TObject);varI:integer;aa:TByteDynArray;bb:string;beginsetlength(…
procedureTForm1.Button1Click(Sender:TObject);vari:integer;begini:=0;repeati:=i+1;memo1.Lines.Add(Int…
//这是我三层开发中常用的一个函数,直接调用CreateSortIDusesSystem.Win.ComObj,System.RegularExpression…
functionS****Split(SourS****:s****ing;Delimiter:s****ing):TArray;vari,len,count,count2:integer;sPart…
unitUnit1;interfaceusesWinapi.Windows,Winapi.Messages,System.SysUtils,System.Variants,System.Classes…
unitUnit1;interfaceusesSystem.Hash,Winapi.Windows,Winapi.Messages,System.SysUtils,System.Variants,Sy…
functionStringsToStr(constvList:TStrings):string;vari:Integer;beginResult:='';fori:=0tovList.Count-1…
unitUnit1;interfaceusesWinapi.Windows,Winapi.Messages,System.SysUtils,System.Variants,System.Classes…
会返回异常Integer.Parse(string)不会返回异常Integer.tryParse('12',i);结果:true12Integer.tryParse('12…
str:=string.Create('a',3);//aaa
str:=string.Parse(r);//将Integer、Extended、boolean解析成string型
PByte转TBytes:a:PByte;b:TBytes;b:=TBytes(a);PByte转Byte:其实就是指针操作a:PByte;b:Byte;b:=a^;Byte转…
procedureTForm1.Button1Click(Sender:TObject);beginmemo3.Lines.Add(wShortFileName(edit1.Text,StrToInt…
//方法1:UsesIOUtils;TFile.ReadAllText(FileName);TFile.ReadAllText(FileName,s,TEncoding.ASCII)//forc…
对于TStrings类型变量,需要使用TStringList.Create;创建[luther.gliethttp],否则提示abstracterror错误TS…
functionGetStrtoend(StrSource,StrBegin:string):string;//(源字符串,开始字符串)varin_star:Integer;beg…
procedureTForm2.Button1Click(Sender:TObject);varI:Integer;str:string;beginstr:=Memo2.Text;//文本内容…
Delphi自带的StringReplace确实效率低,下面我给你两个函数,是世界级程序高手用汇编语言写的,速度绝对快,…
普通替换:varS****:s****ing;i:Integer;T1,T2:Integer;beginT1:=GetTickCount;****yfori:=0toM.Lines.Coun…