Delphi

Delphi

delphi 判断文本是否包含多个关键词之一

40 0

unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;type TForm1 = class(TForm) Memo1: TMemo; Memo2: TMemo; Button1: TButt

Delphi

delphi 获取\xxx\xxxx\1234最后一级名称

37 0

function GetLastName(const fn: string): string;var i:Integer; s:string;begin s := trim(fn); if s[Length(s)]='\' then s := Copy(s,1,Length(s)-1); while Pos('\',s)>0 do begin i := Pos('\',s); s := Copy(s,i+1,Length

Delphi

delphi TThread线程同步

38 0

//线程TThread.CreateAnonymousThread( procedure begin //内容 end //此处无分号 ).Start;//同步 TThread.Synchronize(nil, procedure begin // end);――――――――――――――――原文链接:https://blog.csdn.net/ozhy111/article/details/82957751

Delphi

delphi 根据字符串分隔符位置取值

39 0

unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private d

Delphi

delphi TLog 日志

20 0

varLg: TLogs;Lg := TLogs.Create('_sql.log');Lg.Log('日志内容');Lg.Destroy();unit TLog;interfaceusesWindows, Messages, SysUtils, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls;type TLogs = class private FileName: string; public

Delphi

delphi 泛型数组 StrSplit 字符串分割

47 0

unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private d