文本框的首末2行是空行怎么删除?

来源:百度知道 编辑:UC知道 时间:2024/05/26 04:02:54
空行怎么表示?首先要判断吧?
如果存在空行就删除

谢谢

dim a as string,b as integer
open "c:\a.txt" for output as #1
print #1,text1.text
close #1
open "c:\a.txt" for input as #1
do while not eof(1)
line input #1,a
if b=0 then
if a="" then Text1.text=right(text1.text,len(text1.text)-1)
end if
b=b+1
loop
close #1
if a="" then Text1.text=left(text1.text,len(text1.text)-1)

你说的是编程吗?用什么语言呢?有个trim