README.md
December 4, 2022 ยท View on GitHub
Description
This code is the equivalence of the bitwise complement C opertator (~), except this only works on strings. I got tired of not having this capability, so I wrote it =)
More Info
any string
the bitwise inverse of the string
works ONLY on strings
| Submitted On | |
| By | Jonathan Smith |
| Level | Intermediate |
| User Rating | 5.0 (10 globes from 2 users) |
| Compatibility | VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0, VB Script, ASP (Active Server Pages) |
| Category | String Manipulation |
| World | Visual Basic |
| Archive File |
Source Code
Public Function BinaryInverse(ByVal szData As String)
Dim szRet As String
szRet = Space$(Len(szData))
For i = 1 To Len(szData)
Mid(szRet, i, 1) = Chr$(255 - Asc(Mid(szData, i, 1)))
Next i
BinaryInverse = szRet
End Function