VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code will remove all blank spaces from a string. How are you becomes Howareyou.

by RichW (1 Submission)
Category: String Manipulation
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Wed 13th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code will remove all blank spaces from a string. How are you becomes Howareyou.

Rate This code will remove all blank spaces from a string. How are you becomes Howareyou.



Dim i As Integer
    
    strString = "How are you?"

    For i = 1 To Len(strString)
        strCharacter = Mid(strString, i, 1)
        If strCharacter <> " " Then
             strResult = strResult & strCharacter
        End If
    Next i

Download this snippet    Add to My Saved Code

This code will remove all blank spaces from a string. How are you becomes Howareyou. Comments

No comments have been posted about This code will remove all blank spaces from a string. How are you becomes Howareyou.. Why not be the first to post a comment about This code will remove all blank spaces from a string. How are you becomes Howareyou..

Post your comment

Subject:
Message:
0/1000 characters