VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This small function will strip out the unreadable characters and return readable characters in a st

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

This small function will strip out the unreadable characters and return readable characters in a string. This is great for stripping out these

Rate This small function will strip out the unreadable characters and return readable characters in a st



    Dim lCount As Long
    Dim lPoint As Long
    Dim sTmp As String
    Dim sChr As String
    lCount = Len(sString)                      ' Get a count of chars
    For lPoint = 1 To lCount                   ' Loop through that count
        sChr = Mid(sString, lPoint, 1)         ' Get one chr
        Select Case Asc(sChr)                  ' Set a case for the ASCII value of char
            Case 32 To 126                     ' Is this an Readable Char?
                sTmp = sTmp & sChr             ' If yes then append to list
        End Select '»Select Case Asc(sChr)
    Next '»For lPoint = 1 To lCount
    ReturnReadableChrsOnly = sTmp
End Function


Download this snippet    Add to My Saved Code

This small function will strip out the unreadable characters and return readable characters in a st Comments

No comments have been posted about This small function will strip out the unreadable characters and return readable characters in a st. Why not be the first to post a comment about This small function will strip out the unreadable characters and return readable characters in a st.

Post your comment

Subject:
Message:
0/1000 characters