Ver Mensaje Individual
  #5  
Antiguo 08-04-2008
keyboy keyboy is offline
Miembro
 
Registrado: oct 2004
Posts: 367
Reputación: 22
keyboy Va por buen camino
En realidad lo de ReverseString está muy jalado pues al final termina haciendo el recorrido inverso. Mucho mejor la de dec que creo se puede simplificar un poco:

Código Delphi [-]
function DameloYa(Dato: String): String;
var
  I: Integer;

begin
  for I := Length(Dato) downto 1 do
    if Dato[i] = ' ' then
      break;

  Result := Copy(Dato, I + 1, Length(Dato));
end;

Bye
Responder Con Cita