Join function implementation string concatenation in ASP

Source: Internet
Author: User
Tags join

(List[,delimiter])

Parameter description

List Required. A one-dimensional array that contains the substrings to be joined

Required option. Contains a one-dimensional array of substrings to join.

Delimiter Optional. The character (s) used to separate the substrings in the returned string. Default is the space character

Options available. The character used to delimit substrings in the return string. If omitted, the null character ("") is used. If delimiter is a 0-length string, all items are listed in the same list without a delimiter.

Instance 1

Code to copy the code as follows

Dim A (5), b

A (0) = "Saturday"

A (1) = "Sunday"

A (2) = "Monday"

A (3) = "Tuesday"

A (4) = "Wednesday"

B=filter (A, "n")

document.write (Join (b))

Output: Sunday Monday Wednesday

example, test efficiency

Code to copy the code as follows

  

Speed can be spelled with PHP (though still not as fast as he does),

Another way to use it is

Code to copy the code as follows

S=join (Array ("1", "2", "3",....., "9999"))

The speed is still much faster than "1" & "2" & "3" & .....& "9999"

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.