Version: 1.0
-
Syntax:
- Mid(String,
Start, Length)
- String
- The String argument is the name of the string you wish to
truncate.
- Start
- The Start argument is a numeric position anywhere in the string
counting from the left side. The portion of the string to the left of
this position will be discarded.
- Length
- The optional Length argument is the number of characters
(including blanks) in the string you wish to save counting from the
position designated by the Start argument.
The Mid function returns the portion of the designated string
for a designated length starting from any position in the string.
Examples
Code:
<% =Mid("abcde fghij klmno pqrst uvwxyz", 8)%>
Output:
ghij klmno pqrst uvwxyz
Language(s):
VBScript
Code:
<% =Mid("abcde fghij klmno pqrst uvwxyz", 8, 7)%>
Output:
ghij kl
Language(s):
VBScript
See Also: