uf_delspace( ref string ls_source )
{
string ls
long k
if isnull( ls_source ) then return
ls_source = trim( ls_source )
do
k = pos( ls_source, ' ' )
if k > 0 then
ls_source = left( ls_source, k - 1 ) + mid( ls_source, k + 1 )
end if
loop while k > 0
用一个笨方法来,如下:
string ls_out,ls_entry
integer i
ls_out=""
ls_entry=trim(sle_1.text) //设将文本框的sle_1里的字符去掉空格
if not ls_entry > 0 then return ;
for i=1 to len(ls_entry)
if trim(mid(ls_entry,i,1))>0 then
ls_out=ls_out+mid(ls_entry,i,1)
end if
next
//ls_out就是去掉空的字符串。