Ver Mensaje Individual
  #6  
Antiguo 07-05-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Cierto (SP), la corrijo:

Código Delphi [-]
function Capitalize(Str: string): string;
var Index: Cardinal;
begin
 for Index := 1 to Length(Str) do
  if (Index = 1) or (Str[Index - 1] = ' ') then
   if Str[Index] in ['a'..'z','á','é','í','ó','ú','ñ'] then
    Dec(Str[Index], 32) else
  else
   if Str[Index] in ['A'..'Z','Á','É','Í','Ó','Ú','Ñ'] then
    Inc(Str[Index], 32);
 Result := Str;
end;

Saludos
Responder Con Cita