stringText = "this IS a TeStT OF sTuff !"
response.write "<B>This is the original string:</b> '" & stringText & "'<BR><BR><BR>"
' TCase code
Function TCase(stringText)
stringText = Trim(stringText)
stringTextLCASE = lcase(stringText)
stringTextSplit = split(stringTextLCASE, " ")
stringTextoutput = ""
for each i in stringTextSplit
'stringTextoutput = stringTextoutput & replace(i, left(i,1), Ucase(left(i,1))) & " "
titlecaseletter = ucase(left(i,1))
xcount = len(i) - 1
titleword = right(i,xcount)
stringTextoutput = stringTextoutput & " " & titlecaseletter & titleword
Next
TCase = stringTextoutput
end function
'text output
response.write TCase(stringText)
Search This Blog
Popular Posts
- List of KeyAscii in VB6.0
- List of VB Keycode in Visual Basic 6.0
- Enable and Disable Button VB6 code
- Check valid Email Address in PHP code
- Clear Textbox when Onclick HTML Javascript code
- Get the Filename and the extension of Filename Visual Basic 6.0
- Disable Right-Click of Website - HTML code
- Latest Plate Number with barcode in the Philippines