Home Know Me Snaps Feedback
 
::Online Microsoft Office,Web ,Graphic and many more Tutorials
String Functions
Asc();
Asc() will provide you with the ASCII character code of the character in the parentheses.
<%
str1 = Asc("K")
response.write str1
%>
cStr();
cSrt() will convert a numeric value into a string.
<%
int1 = 35
str1 = cStr(int1)
%>
inStr();
inStr() will locate the occurance of a character (or set of characters) in a string and output it's place.
<%
str1 = " ABCDEF"
str2 = Trim(str1)
response.write str2
%>
LCase();
LCase() will convert an entire string to lowercase.
<%
str1 = "ABCDEF"
str2 = LCase(str1)
response.write str2
%>
UCase();
UCase() will convert an entire string to uppercase.
<%
str1 = "abcdef"
str2 = UCase(str1)
response.write str2
%>
Trim();
Trim will remove all blank spaces from the beginning or end of a string.
<%
str1 = " ABCDEF"
str2 = Trim(str1)
response.write str2
%>
Len();
Len() will tell you the number of characters in a string.
<%
str1 = "ABCDEF"
str2 = Len(str1)
response.write str2
%>
Replace();
Replace() will replace a character (or set of characters) with another character (or set of characters).
<%
str1 = "ABCDEF"
str2 = Replace(str1,"CD","YZ")
response.write str2
%>
Split();
Split() will split a string into an array of values based on the character defined.
<%
str1 = "ABC,DEF"
str2 = Split(str1,",")
response.write str2(0)
response.write "

"
response.write str2(1)
%>
Left();
Left() will retrieve the number of characters specified from the left of the string.
<%
str1 = "ABCDEF"
str2 = Left(str1,3)
response.write (str2)
%>

Right();
Right() will retrieve the number of characters specified from the right of the string.
<%
str1 = "ABCDEF"
str2 = Right(str1,3)
response.write str2
%>
Mid();
Mid() will retrieve the number of characters specified from the middle of the string.
<%
str1 = "ABCDEF"
str2 = Mid(str1,3,2)
response.write str2
%>
   Table of Content
Install ASP and IIS On WinXp Pro
Asp Syntax
String Function
Date Function
Randon Number
Database Connection String
Include
 
 
 
       
   
© 2008, krishnakumar.com.np. All rights reserved
.