帮助我aboute split() [英] help me aboute split()
问题描述
嗨
i希望将示例文本分解为单词:
示例text =这是一个例子
将此文本分解为单词并保存在数组中
hi
i want to break sample text to word:
sample text = "this is a example"
break this text to word and save in array
a(0)="this"
a(1)="is"
a(2)="a"
a(3)"example"
i不能用split()打破?!
我希望任何单词链接到www.sample.com
在浏览器中显示:
这个,是, a ,样本
请
i cant break with split()?!
and i want any word link to "www.sample.com"
show in browser:
this , is , a , sample
please
推荐答案
是的,您可以使用 String.Split [ ^ ]方法,例如
Yes, you may use the String.Split[^] method, e.g.
Dim sample as String = "this is a example"
Dim s As String() = sample.Split(New [Char]() {" "c })
我希望任何单词链接到www.sample.com
在浏览器中显示:
这个,是,样品
and i want any word link to "www.sample.com"
show in browser:
this , is , a , sample
呃?!
请详细说明orate。
Uh?!
Please elaborate.
是的,没关系!!
解决方案:
yes it''s ok!!
solution:
dim s as string =this is a sample
dim words as string()= s.split(new char(){c})
dim word as string
每个单词的
response.write()
response.write(word)
response.write()
response.write (
dim s as string="this is a sample"
dim words as string()=s.split(new char(){" "c})
dim word as string
for each word in words
response.write("")
response.write(word)
response.write("")
response.write("
这篇关于帮助我aboute split()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!