Capitalize first letter of a string vbscript classic asp

So Here we go, need to capitalize the first letter of a string. thats easy.

myString = “donald”

If myString <> “” Then ‘ this is important becuase if the string is empty it will create an error.
myString = ucase(left(myString , 1)) + right(myString, len(myString )-1)
End If

Response.Write(myString)

Donald

Leave a Reply