帮助我aboute split() [英] help me aboute split()

查看:95
本文介绍了帮助我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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆