Check if string contains space

后端 未结 3 1145
死守一世寂寞
死守一世寂寞 2020-12-31 17:28

I am trying to check if a sting has a space in it. The following is not working for me.

if (skpwords.contains(lcase(query)) And Mid(query, InStrRev(query, \"         


        
3条回答
  •  北海茫月
    2020-12-31 18:03

    The best and shortest possible answer to this would be where you use the Instr function. This can be in the below format as ::

    mysentence = "This is a sentence" 
    if Instr(mysentence, " ")>0 Then
     'do your stuff here..
    else
     ' do else stuff here.. 
    End if
    

提交回复
热议问题