The syntax of the split function in ASP

Source: Internet
Author: User

Function: The Split function returns a one-dimensional array based on 0 that contains the specified number of substrings

Grammar:
Split (Expression[,delimiter[,count[,compare]])
Parameters:

Parameters Describe
Expression Required option. A string expression that contains substrings and delimiters. If expression is a zero-length string, split returns an empty array, which is an array that contains no elements and data.
Delimiter Options available. The character used to identify the bounds of the substring. If omitted, use a space ("") as the separator. If delimiter is a zero-length string, returns the set of cell numbers that contain the entire expression string.
Count Options available. The number of substrings returned,-1 indicates that all substrings are returned.
Compare

Options available. Indicates the numeric value of the comparison type to use when calculating the substring.
You can select one of the following values:
0 = vbbinarycompare-perform binary comparison
1 = vbTextCompare-Performs a text comparison.

Example:
Dim txt,a1
txt= "A,b,c,d,e,f"
A1=split (TXT, ",")
For the i=0 to UBound (A1) ' UBound function to get the total number of arrays
Response.Write A1 (i) & "<br>" outputs the string in the first array
Next

The result of the final output is:
A
B
C
D
E
F

-->

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.