function AddThousandSeparator( S: string; Chr: char ): string;
{ Add Thousand Separator to a string }
var
i: integer;
begin
Result := S;
i := Length( S ) - 2;
while i > 1 do
begin
Insert( Chr, Result, i );
i := i - 3;
end;
end;
Advertisement