double转ansistring使用类似vb的format函数 【程序编程相关:迷茫?ping广播地址的回应】
【推荐阅读:网站配色奥秘大公开】
ansi转tclor型(从现在开始ansisting简称ansi 代码: 【扩展信息:WebService Notes】
代码: void __fastcall tform1::button1click(tobject *sender) { double d = 123.456; ansistring str = formatfloat( "000000.00" , d ); } //得到 000123.45,当然你可以使用"# . , ; e+ e- xx"等符号,你自己试试 :wink:
void __fastcall tform1::button1click(tobject *sender) { ansistring test = "0x00ff8080"; tcolor col = stringtocolor( test ); }
tclor转ansi 代码:
void __fastcall tform1::button1click(tobject *sender) { tcolor col = 0x00ff8080; ansistring str = colortostring( col ); }
ansi的一部分消除,哈哈,类似vb里的mid函数,不过是反的~ 代码:
void __fastcall tform1::button1click(tobject *sender) { ansistring test = "abcdef"; int first = 3; // 消除制定开头 int length = 2; // 消除制定长度 ansistring dstr = test.delete( first , length ); }//得到abef
ansi的一部分插入 代码:
... 下一页