VBScript String Functions in Classic ASP

Classic ASP commonly uses VBScript string functions to combine text, measure length, change case, compare/search values, extract substrings, replace text and clean user input.

Use this page as the parent reference for the string tutorials below. For visitor-controlled text, string manipulation is not a substitute for validation, parameterized database commands, or output encoding.

String function tutorials

TopicUse
Joining stringsCombine values with & and understand the older + form.
Len() and LenB()Count characters and work with byte-oriented length when required.
Trim(), LTrim(), RTrim()Remove leading or trailing spaces.
UCase() and LCase()Convert letter case.
StrReverse()Reverse character order.
StrComp()Compare strings using binary or text comparison.
Left(), Right(), Mid()Extract parts of a string.
InStr()Find the position of one string inside another.
Replace()Search and replace substrings.
Text line breaks in HTMLConvert vbCrLf to an HTML line break for trusted text.
Split()Break a delimited string into an array.
Join()Combine array elements into one string.
Security note: when these functions are used with submitted form data, validate the expected format and encode output before placing visitor-controlled text into HTML.

ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer