本文整理自网络,侵删。
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 listbox 行高根据内容高度进行调速
Delphi 10.3版本获取windows系统版本和cpu信息
Delphi try abort、exit except 、finally end 执行情况
更多相关阅读请进入《Delphi》频道 >>