Ver Mensaje Individual
  #7  
Antiguo 31-05-2007
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

A ver qué tal parece algo así...

Código Delphi [-]
function NormalizeString(str: string;
 maxStr: integer=10): string;
begin
  result := '';
  if (Length(str) < maxStr) then
    while(Length(result) < (maxStr-Length(str)))do
      result := result+'0';
  result := result+str;
end;
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita