|
Uppercase or lowercase a
string |
<html>
<body>
<%
name = "Bill Gates"
response.write(ucase(name))
response.write("<br>")
response.write(lcase(name))
%>
</body>
</html>
|
BILL GATES
bill gates |
|
Trim a string |
<html>
<body>
<%
name = " DevInfoWare"
response.write("visit" & name & "now<br />")
response.write("visit" & trim(name) & "now<br />")
response.write("visit" & ltrim(name) & "now<br />")
response.write("visit" & rtrim(name) & "now")
%>
</body>
</html>
|
visit DevInfoWare now
visitDevInfoWarenow
visitDevInfoWare now
visit DevInfoWarenow |
|
How to reverse a string? |
<html>
<body>
<%
sometext = "Hello Everyone!"
response.write(strReverse(sometext))
%>
</body>
</html> |
!enoyrevE olleH |
|
How to round a number? |
<html>
<body>
<%
i = 48.66776677
j = 48.3333333
response.write(Round(i))
response.write("<br>")
response.write(Round(j))
%>
</body>
</html> |
49
48 |
|
A random number |
<html>
<body>
<%
randomize()
response.write(rnd())
%>
</body>
</html>
|
0,4049951 |
|
Return a specified number
of characters from left/right of a string |
<html>
<body>
<%
sometext="Welcome to this Web"
response.write(Left(sometext,5))
response.write("<br>")
response.write(Right(sometext,5))
%>
</body>
</html>
|
Welco
s Web |
|
Replace some characters in
a string |
<html>
<body>
<%
sometext="Welcome to this Web!!"
response.write(Replace(sometext, "Web", "Page"))
%>
</body>
</html>
|
Welcome to this Page!! |
|
Return a specified number
of characters from a string |
<html>
<body>
<%
sometext="Welcome to this Web!!"
response.write(Mid(sometext, 9, 2))
%>
</body>
</html> |
to |