para que ainda quizer uma função que converte para maiusculo somente a
primeira letra

function UpperNome(const Nome: String): String;
var
    x : Integer;
    lista : Array[0..18] of String[03];

  function NaoAchaPreposicao(Palavra : String): Boolean;
  var
      x : Integer;
  begin
    Result := True;
    for x := 0 to 18 do
      if (Trim(Palavra) = lista[x]) then
        Result := False;
  end; // FUNCTION

begin

  if (Nome = '') Then
    Exit;

  Result := LowerCase(Nome);

  lista[0] := 'das';
  lista[1] := 'dos';
  lista[2] := 'de';
  lista[3] := 'do';
  lista[4] := 'da';
  lista[5] := 'o';
  lista[6] := 'a';
  lista[7] := 'os';
  lista[8] := 'as';
  lista[9] := 'em';
  lista[10] := 'na';
  lista[11] := 'no';
  lista[12] := 'até';
  lista[13] := 'ao';
  lista[14] := 'aos';
  lista[15] := 'com';
  lista[16] := 'dum';
  lista[17] := 'por';
  lista[18] := 'sob';

  Result := UpCase(Result[1]) + Copy(Result, 2, Length(Result));

  for x := 2 to Length(Nome) do
    begin
      if (Nome[x] = #32) then
        if (Copy(LowerCase(Nome),x+1,1) <> 'e') then
          if (NaoAchaPreposicao(Copy(LowerCase(Nome),x+1,3))) then
            Result := Copy(Result, 1, x) + UpCase(Result[x+1]) +
Copy(Result, x+2, Length(Result));
    end; // FOR
end;

Responder a