edit4.text='12120.0'
if trim(edit4.Text)<>'' then edit4.Text:=format('%5.1m',[strtofloat(edit4.Text)]);
可以格式化字符串edit4.text='¥12,120.0'
现在要把edit4.text='¥12,120.0'还原 edit4.text='12120.0' 这样的格式添加到数据库可以谈谈那种方法最好,有这样的还原函数吗?
if trim(edit4.Text)<>'' then edit4.Text:=format('%5.1m',[strtofloat(edit4.Text)]);
可以格式化字符串edit4.text='¥12,120.0'
现在要把edit4.text='¥12,120.0'还原 edit4.text='12120.0' 这样的格式添加到数据库可以谈谈那种方法最好,有这样的还原函数吗?
c, c1: Currency;
s: string;
procedure msg(s: string);
begin
ShowMessage(s);
end;
begin
c := 99.88;
s := CurrToStrF(c, ffCurrency, 8);
msg(s); // 方法一 s := Format('%m', [c1]);
msg(s); // 方法二.有分号 s := CurrToStrF(c, ffCurrency, 8);
Delete(s, 1, Length(CurrencyString));
c1 := StrToCurr(s);
msg(CurrToStr(c1)); //
end;
var i:integer;
temp:string;
begin
ss:=trim(ss);
for i:=length(ss) downto 1 do
if ((copy(ss,i,1)>=#46) and (copy(ss,i,1)<=#57))and(copy(ss,i,1)<>#47) then temp:=copy(ss,i,1)+temp;
result:=trim(temp);
end;
我用是比较笨的方法,请指点