web tools rank checker

domain .cn
.net .cn .com.cn
你正在阅览 :: 简体中文:: 学习 ASP SQL VB HTML code

学习 .ASP SQL HTML XML CSS JAVA Perl code study
English Chinese_Traditional Chinese_Simplified

你正在阅览 :: 简体中文 Chinese_Simplified

学习.主题:
首页
ASP
CSS
Ecommerce
HTML
InternetProtocol
JAVA
Microsoft
Robots
SearchEngine
SQL
SQLserver
VBscript
. Array
»Filter
»Split
»UBound
. Functions
. Prevent_hacker
XML

SiteMap

3w....学习.教学 > VBSCRIPT > array » split

3w learning

array >
split

Title:

Split(expression[,delimiter[,count[,compare]]])


可将一数据格中的长字符串或数据加以分割数组化,以方便取用
Description:

expression Required. String expression containing substrings and delimiters. If expression is a zero-length string, Split returns an empty array, that is, an array with no elements and no data. delimiter Optional. String character used to identify substring limits. If omitted, the space character (" ") is assumed to be the delimiter. If delimiter is a zero-length string, a single-element array containing the entire expression string is returned. count Optional. Number of substrings to be returned; -1 indicates that all substrings are returned. compare Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings section for values vbBinaryCompare : 0 : Perform a binary comparison. vbTextCompare : 1 : Perform a textual comparison. ----- compare setting not often use ----- often only use like this:: Split(expression[,delimiter])


最常使用的模式为 :: Split(expression[,delimiter])
Example Code:

Example 1 :: Split(expression[,delimiter[,count[,compare]]]) The function performs a textual comparison of the delimiter:: [,-1] and returns all of the substrings :: [, 1] <% ' example code of using compare setting Dim MyString, MyArray, Msg MyString = "8/6/2006" MyArray = Split(MyString, "/", -1, 1) ' MyArray(0) contains "8". ' MyArray(1) contains "6". ' MyArray(2) contains "2006". Msg = MyArray(0) & " " & MyArray(1) Msg = Msg & " " & MyArray(2) MsgBox Msg %> Example 2 :: Split(expression[,delimiter]) from a get form http://---.com/faq.asp?query=sports&query=baseball <% query=request(query") queryList=Split(query,", ") response.write queryList %> Example 3 : Split(expression) <% dim date,d date="8 6 2006" d=Split(date) document.write(d(0) & "<br />") document.write(d(1) & "<br />") document.write(d(2)) %>


当只用 Split(expression) 时, 将自动以space 间隔成数组
Example Result:

Example 1: 8 6 2006 Example 2: sports, baseball Example 3 : 8 6 2006


Tips: Split may very helpful to read a daily memo Tips: Design a special code to divide your data so you will be more easy to split the data.


方便日志或杂记的数据的整理
..
...
...

[ 8/28/2008 ]

www learning school add more scripts and tips memo
You are at >>3WS.EZER.COM >> 3WS.EZER.COM/VBSCRIPT/ARRAY/SPLIT.ASP>>VBSCRIPT
Helpful link:: SEO web tools :: Live PR | SERP checker
back to top Ezer code adding :: Questions ;email