Search Tools Links Login

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

Original Author: Lefteris Eleftheriades


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)
SwitchCase = out
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 207 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.