本文整理自网络,侵删。
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 xe8中的firemonkey应用程序将文本复制到剪贴板
更多相关阅读请进入《Delphi》频道 >>