Advertisement
7_2009-2012 String Manipulation #225271

Switch Case

Did you know that the capital letters are different from the small letters only by one bit? A = 01000001 while a = 01100000 the 3rd bit is the capitalization

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
Private Sub Form_Load()
 MsgBox SwitchCase("Sex") 'returns sEX
End Sub
Function SwitchCase(Text As String) As String
 Dim i&, out$
 For i = 1 To Len(Text)
   out = out & Chr(Asc(Mid(Text, i, 1)) Xor 32)
 Next
 SwitchCase = out
End Function
원본 댓글 (3)
Wayback Machine에서 복구됨