Created
July 29, 2013 01:13
-
-
Save Patrique/6101577 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
Function MixedCase(strInput) | |
Dim strPos, strSpace, strOutput | |
' Set our position variable to the start of the string. | |
strPosition = 1 | |
' Loop to check spaces | |
Do While InStr(strPosition, strInput, " ", 1) <> 0 | |
strSpace = InStr(strPosition, strInput, " ", 1) | |
strOutput = strOutput & UCase(Mid(strInput, strPosition, 1)) | |
strOutput = strOutput & LCase(Mid(strInput, strPosition + 1, strSpace - strPosition)) | |
strPosition = strSpace + 1 | |
Loop | |
' Last word is currently uncapitalized - fix this | |
strOutput = strOutput & UCase(Mid(strInput, strPosition, 1)) | |
strOutput = strOutput & LCase(Mid(strInput, strPosition + 1)) | |
MixedCase = strOutput | |
End Function | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment