本文整理自网络,侵删。
function PADL(Src: string; Lg: Integer): string;
begin
Result := Src;
while Length(Result) < Lg do
Result := ' ' + Result;
end;
function PADR(Src: string; Lg: Integer): string;
begin
Result := Src;
while Length(Result) < Lg do
Result := Result + ' ';
end;
function PADC(Src: string; Lg: Integer): string;
begin
Result := Src;
while Length(Result) < Lg do
begin
Result := Result + ' ';
if Length(Result) < Lg then
begin
Result := ' ' + Result;
end;
end;
end;
S := PADL(S,32);
相关阅读 >>
Delphi xe中windows7新的taskbar功能的使用
Delphi通过spcomm com口发短信包括pud编码解码
Delphi trayicon控件,如何实现窗口最小化的时候到系统托盘?
更多相关阅读请进入《Delphi》频道 >>