
vb6.0 如何判断字符串内容是否为空,就是字符串里面全是空格,回车之类的
1个回答
展开全部
假设有字符串str
str=replace(str," ","")
str=replace(str,vbcrlf,"")
str=replace(str,vbcr,"")
str=replace(str,vblf,"")
if str="" then
'就说明是空
end if
str=replace(str," ","")
str=replace(str,vbcrlf,"")
str=replace(str,vbcr,"")
str=replace(str,vblf,"")
if str="" then
'就说明是空
end if
追问
额,好快,忘了标悬赏分了,一会高分送上。vbcr,vblf分别是代表回车和换行的意思吧?
追答
vbcr是\r, vblf是\n
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询