vb 演示如何去除字符串结尾空格,把输入框中的含有空格的字符串,全部过滤掉空格,这个源码似乎有上结简单了,使用RTrim(),一行代码即可搞定:
Private Sub Command1_Click()
Text2.Text = RTrim(Text1)
End Sub
主要是使用了RTrim()函数,这个函数不只是过滤行尾空格,也会将字符串中间空格过滤掉。
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001614s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.092708s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.010559s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001211s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.001057s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003115s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.000876s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.003699s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.015301s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001236s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 294559 [ RunTime:0.013472s ]