



(19 ratings)
Asc();
Asc() will provide you with the ASCII character code of the character in the parentheses.
|
<% str1 = Asc("B") 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 = inStr(str1,"BC") 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 %> |
That's it! Have fun playing with strings.
20 Random Tutorials from the same category :
NEW WAY TO HANDLE VARIABLES
FORMAT SPECIAL DATA
ASP.NET Tutorial - Making image thumbnails
GLOBAL.ASA IN ASP
DISPLAY DATA FROM DATABASE
The Recordset Object
Date and Time Functions In ASP
Server-side Scripting
Recordset Access Methods
ASP.NET 2 Special Purpose Folders
Iterating through Collections In ASP
Processing Form Information In ASP
Installing ASP on your own computer
String Functions
SQL Access Methods In ASP
Text Editors and Software to Write ASP
Passing Query Strings In Asp
Reading form variables passed in the URL
Searching for Matching Values
Creating Databases














