Results 1 to 6 of 6

Thread: remove all spaces from string [vb]

  1. #1
    ghadeer is offline Net Builder
    Join Date
    Oct 2009
    Posts
    108
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    Public Function RemoveAllSpaces(ByVal InputString As String) _ 
    As String
    \'NOTE: Intended for VB5 and below; if you have VB6, use built-in
    \'Replace Function. (e.g., MyString = Replace(MyString, \" \", \"\")
    Dim sAns As String
    Dim lLen As String
    Dim lCtr As Long, lCtr2 As Long
    Dim sChar As String
    
    lLen = Len(InputString)
    sAns = InputString
    lCtr2 = 1
    For lCtr = 1 To lLen
    sChar = Mid(InputString, lCtr, 1)
    If sChar <> \" \" Then
    Mid(sAns, lCtr2, 1) = sChar
    lCtr2 = lCtr2 + 1
    End If
    Next
    If lCtr2 > 1 Then
    sAns = Left(sAns, lCtr2 - 1)
    Else
    sAns = \"\"
    End If
    RemoveAllSpaces = sAns
    End Function

  2. #2
    Aytac01's Avatar
    Aytac01 is offline Newbie Net Builder
    Join Date
    Feb 2009
    Location
    Webhost Hell!
    Posts
    83
    Thanks
    0
    Thanked 3 Times in 3 Posts

  3. #3
    ghadeer is offline Net Builder
    Join Date
    Oct 2009
    Posts
    108
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i mean visual basic
    <div class='quotetop'>QUOTE (L33T @ May 7 2009, 12:01 PM) <{POST_SNAPBACK}></div>
    Kk..
    Which VB? There is alot of them :P[/b]

  4. #4
    Aytac01's Avatar
    Aytac01 is offline Newbie Net Builder
    Join Date
    Feb 2009
    Location
    Webhost Hell!
    Posts
    83
    Thanks
    0
    Thanked 3 Times in 3 Posts
    <div class='quotetop'>QUOTE (ghadeer @ May 7 2009, 01:19 PM) <{POST_SNAPBACK}></div>
    i mean visual basic[/b]
    Yes I know LOL!
    .NET?

  5. #5
    Eyes's Avatar
    Eyes is offline Newbie Net Builder
    Join Date
    May 2009
    Location
    In a Party
    Posts
    83
    Thanks
    0
    Thanked 1 Time in 1 Post
    i hate vb code, php is the easiest to understand

  6. #6
    ghadeer is offline Net Builder
    Join Date
    Oct 2009
    Posts
    108
    Thanks
    0
    Thanked 0 Times in 0 Posts
    its vb6
    vb6 used to desktop progarmnot to web site bulid
    <div class='quotetop'>QUOTE (Eyes @ May 8 2009, 08:14 AM) <{POST_SNAPBACK}></div>
    i hate vb code, php is the easiest to understand[/b]

Similar Threads

  1. Replies: 3
    Last Post: 19 August, 2010, 16:09 PM
  2. [WTS] I am selling 125x125 ad spaces
    By Jgblogging in forum Advertising
    Replies: 0
    Last Post: 29 April, 2010, 18:49 PM
  3. String into html with Javascript
    By imported_whitey99 in forum Programming
    Replies: 0
    Last Post: 14 August, 2009, 01:51 AM
  4. [WTS] banner spaces on PR3 symbian mobile forum
    By algert in forum Links
    Replies: 1
    Last Post: 10 August, 2009, 05:54 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •