Código Delphi [-] var Str: string; begin Str:= '000345'; // Eliminamos los ceros a la izquierda while (length(Str)>1) and (Copy(Str,1,1)='0') do delete(Str,1,1); // Si el primer caracter es un punto añadimos un cero a la izquierda if Copy(Str,1,1)='.' then Str:= '0' + Str;
var Str: string; begin Str:= '000345'; // Eliminamos los ceros a la izquierda while (length(Str)>1) and (Copy(Str,1,1)='0') do delete(Str,1,1); // Si el primer caracter es un punto añadimos un cero a la izquierda if Copy(Str,1,1)='.' then Str:= '0' + Str;