How to get text value from cxCurrencyEdit without comma

How'dy , today i have problem from cxCurrencyEdit but easy get solution just make function to eliminate char target. on my case i have cxCurrencyEdit1 in format auto 3 digit comma, but on execution query comma still folow. for integer variable it's failed. so i much eliminate that comma.


it's is small function for that :

function killkoma(const str: string): string;
const
InvalidChars : set of char = [',','.'];
var
i, Count: Integer;
begin
SetLength(Result, Length(str));
Count := 0;
for i := 1 to Length(str) do
if not (str[i] in InvalidChars) then
begin
inc(Count);
Result[Count] := str[i];
end;
SetLength(Result, Count);
end;

and you can call like this
..
var a:string;
Begin
a:= killkoma(cxCurrencyEdit1.Text);
ShowMessage(a);