Sunday, July 6, 2008

Format First Capital


procedure ShowText();
var
s : String;
i : Integer;
begin
s := 'is another way to think about what you x';
s[1] := UpCase(s[1]);
for i := 1 to Length(s) do
begin
if s[i] = ' ' then
if i < Length(s) then
s[i+1] := UpCase(s[i+1]);
end;

ShowMessage(s);
end;

No comments: