Sentence Case in Classic ASP Script!

Learn how you can make the first letter Capital and others small in this tutorial.

Here is the function with example, copy paste and use it in any of your script

<%

Function makeSentence(arg)
    Dim temp: temp = ""
    If arg <> "" Then
        temp = UCase(Left(arg, 1))
        If Len(arg) > 1 Then
            temp = temp & Mid(arg, 2)
        End If
    End If
    makeSentence = temp
End Function

response.write(makeSentence("this is just a test of sentence case"))

%>

Output of the above script will be:

This is just a test of sentence case

Leave a Reply

Theme: Overlay by Kaira
Agurchand