Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Functions
Left Function
Len Function
LTrim Function
RTrim Function
Trim Function
Right Function
FUNCTION: Mid( )
Implemented in version 1.0
Mid
(String, Start,
Length
)
The
Mid
function returns the portion of the designated string for a designated length starting from any position in the string.
There are two mandatory arguments.
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.
Code:
<% =Mid("abcde fghij klmno pqrst uvwxyz", 8) %>
Output:
ghij klmno pqrst uvwxyz
There is one optional argument.
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.
Code:
<% =Mid("abcde fghij klmno pqrst uvwxyz", 8, 7) %>
Output:
ghij kl
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information