split是什么意思呀

cerry 2003-07-01 03:39:10
如题
...全文
473 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
cerry 2003-07-01
  • 打赏
  • 举报
回复
谢谢,你这就给你们结贴
sailor001 2003-07-01
  • 打赏
  • 举报
回复
a="1,2,3"
b=split(a,",")
那么

b(0)=1
b(1)=2
b(2)=3
alphayycn 2003-07-01
  • 打赏
  • 举报
回复
比如说:temp=192.168.0.1

templ(0)是192
templ(1)是168
templ(2)是0
templ(3)是1
xiaobird1 2003-07-01
  • 打赏
  • 举报
回复
意思就是将temp1字符串按'.'分割,复值给temp
执行完temp是数组形式
cerry 2003-07-01
  • 打赏
  • 举报
回复
他这个语句是这样写的:temp=split(temp1,".")
而temp1=request.servervariables("http_host")
那么temp起个什么作用呢
kinglately 2003-07-01
  • 打赏
  • 举报
回复
Returns a zero-based, one-dimensional array containing a specified number of substrings.

Function Split(
ByVal Expression As String,
Optional ByVal Delimiter As String = " ",
Optional ByVal Limit As Integer = -1,
Optional ByVal Compare As CompareMethod = CompareMethod.Binary
) As String()
Parameters
Expression
Required. String expression containing substrings and delimiters. If Expression is a zero-length string (""), the Split function returns an array with no elements and no data.
Delimiter
Optional. Single character used to identify substring limits. If Delimiter is 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.
Limit
Optional. Number of substrings to be returned; the default, –1, indicates that all substrings are returned.
Compare
Optional. Numeric value indicating the comparison to use when evaluating substrings. See Settings for values.


Example
The following example demonstrates the Split function:

Dim myString As String = "Look at these!"
' Returns ["Look", "at", "these!"]
Dim myArray() As String = Split(myString)
liuqinyi 2003-07-01
  • 打赏
  • 举报
回复
分割字符存储结果到数组里面

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧