Thursday, 30 November 2017

Vbscript: Multiple uneven spaces to single space


Input string has uneven spaces. 

sInput = "uftHelp=  User Firendly      Techy Help    additional                  string for               you"

Do while instr(1,sinput,"  ")>0
 
If instr(1,sinput,"  ")>0 Then
   
    x= replace(sInput,"  "," ")
   
    sInput=x
   
End If

Loop
   
print x

O/P:uftHelp= User Firendly Techy Help additional string for you

No comments:

Post a Comment

Spring Boot : Exception Handler 14