VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Switch Case

by Lefteris Eleftheriades (29 Submissions)
Category: String Manipulation
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

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

Rate Switch Case

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

Download this snippet    Add to My Saved Code

Switch Case Comments

No comments have been posted about Switch Case. Why not be the first to post a comment about Switch Case.

Post your comment

Subject:
Message:
0/1000 characters