Uppercase or lowercase a string and Trim a string

Started by sukishan, Aug 20, 2009, 12:01 PM

Previous topic - Next topic

sukishan

ASP Source:  Uppercase or lowercase

<html>
<body>

<%
name = "Bill Gates"
response.write(ucase(name))
response.write("
")
response.write(lcase(name))
%>

</body>
</html>

<html>
<body>

Output Result:
BILL GATES
bill gates
---------------------------

Trim a string
<%
name = " W3Schools "
response.write("visit" & name & "now
")
response.write("visit" & trim(name) & "now
")
response.write("visit" & ltrim(name) & "now
")
response.write("visit" & rtrim(name) & "now")
%>

</body>
</html>

Output Result:

visit W3Schools now
visitW3Schoolsnow
visitW3Schools now
visit W3Schoolsnow
A good beginning makes a good ending