Advertisement
ASP_Volume3 String Manipulation #45700

Get the binary inverse of a string

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 =)

AI

KI-Zusammenfassung: 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.

Quellcode
original-source
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
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine