Advertisement
2002C String Manipulation #11801

Return Readable Characters

This small function will strip out the unreadable characters and return readable characters in a string. This works great for stripping thoes little boxes out of the text that you just snagged from a web page. I know that a lot of you have used my code, but have not voted. It would be nice to see some feedback in the form of a vote. Thanks.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Function ReturnReadableChrsOnly(sString As String) As String
  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
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine