📄 globalunit.pas
字号:
unit GlobalUnit;
interface
uses SysUtils, Classes;
function FormatDate(ADate: TDateTime; sFormat: string = 'yyyy-mm-dd'): string;
procedure AddLog(vList: TStrings; vPath, vFile: string);
function ReadFileNameText(vPath, vSection, vKey: string): string;
function IIF(Condition: Boolean; V1, V2: Integer): Integer; overload;
function IIF(Condition: Boolean; V1, V2: string): string; overload;
function SPACE(N: Integer): string;
function ALLTRIM(S: string): string;
procedure LoadHtml(vPath, vSection, vKey: string; vList: TStrings);
implementation
function IIF(Condition: Boolean; V1, V2: Integer): Integer; overload;
begin
if (Condition) then Result := V1 else Result := V2;
end;
function IIF(Condition: Boolean; V1, V2: string): string; overload;
begin
if (Condition) then Result := V1 else Result := V2;
end;
function SPACE(N: Integer): string;
var i: Integer;
begin
Result := '';
for i := 1 to N do
Result := Result + ' ';
end;
function ALLTRIM(S: string): string;
begin
Result := TrimLeft(TrimRight(S));
end;
//---------------------------------------------------------------------------
//格式化日期
function FormatDate(ADate: TDateTime; sFormat: string = 'yyyy-mm-dd'): string;
begin
Result := FormatDateTime(sFormat, ADate);
end;
procedure AddLog(vList: TStrings; vPath, vFile: string);
begin
end;
function ReadFileNameText(vPath, vSection, vKey: string): string;
begin
result:='';
end;
procedure LoadHtml(vPath, vSection, vKey: string; vList: TStrings);
begin
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -