Ver Mensaje Individual
  #2  
Antiguo 18-08-2005
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Parece ser que ese es el límite.

Prueba este par de funciones:

Código Delphi [-]
uses StrUtils;

function LPad(S: String; Len: Integer; Ch: Char): String; overload;
begin
  Len := Len - Length(S);
  if Len < 0 then Len := 0;
  Result := DupeString(Ch, Len) + S;
end;

function LPad(D: Integer; Len: Integer; Ch: Char): String; overload;
begin
  Result := LPad(IntToStr(D), Len, Ch);
end;


Uso:

Código Delphi [-]
Edit1.Text := LPad(15, 32, '0'); // devuelve '15' precedido de 30 ceros
Edit1.Text := LPad('hola', 32, '#'); // devuleve 'hola' precedido de 28 '#'

// Saludos
Responder Con Cita