ASP's string manipulation function _asp Foundation

Source: Internet
Author: User
Tags rtrim

Example of an ASP string function
Use String functions to truncate the string to the end, case substitution, and so on.

Function Grammar Function
Len Len (String|varname) Returns the number of characters within a string, or the number of bytes required to store a variable.
Trim Trim (String) Remove the space before and after the string
Ltrim Ltrim (String) Remove the space before the string
Rtrim Rtrim (String) Remove the space after the string
Mid Mid (String,start,length) Gets a length string from the start character of the string string, if the third argument is omitted to represent a string starting from the start character to the end of the string
Left Left (String,length) To get a length string from the left side of a string string
Right Right (String,length) To get a length string from the right of a string string
LCase LCase (String) Converts all uppercase letters in string strings to lowercase letters
UCase UCase (String) Converts all uppercase letters in a string string to uppercase letters
StrComp StrComp (String1,string2[,compare]) Returns a comparison between the string1 string and the string2 string, if two strings are the same, returns 0 if less than 1, or 1 if greater than
InStr INSTR (String1,string2 [, compare] ) Returns the position of the first occurrence of the string1 string in the string2 string
Split Split (String1,delimiter [, count[, start] ])

Splits a string into a one-dimensional array based on delimiter, where delimiter is used to identify the substring bounds. If omitted, use a space ("") as the separator.
The number of substrings returned by count,-1 indicates that all substrings are returned.
Start is 1 to perform a text comparison, if 0 or omit to perform a binary comparison.

Replace Replace(expression, find, replacewith[, compare[, count[, start]]]) Returns a string in which a specified number of substrings (find) is replaced with another substring (replacewith).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.