拆分字符串 [英] Splitting string

查看:93
本文介绍了拆分字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个多行地址字段,每行由CRLF分隔。怎么

我可以用crlf作为分隔符将这个字段分成单个字符串吗?


谢谢


问候

Hi

I have a multi-line address field which has each line separated by CRLF. How
can I split this field into individual strings using crlf as separator?

Thanks

Regards

推荐答案



String.Split?

http://msdn2.microsoft.com/en-us/lib...ing.split .aspx


" John" < Jo ** @ nospam.infovis.co.ukwrote in message

news:OP ************* @ TK2MSFTNGP06.phx.gbl ...

String.Split ?

http://msdn2.microsoft.com/en-us/lib...ing.split.aspx

"John" <Jo**@nospam.infovis.co.ukwrote in message
news:OP*************@TK2MSFTNGP06.phx.gbl...




我有一个多行地址字段,每行由CRLF分隔。
Hi

I have a multi-line address field which has each line separated by CRLF.




如何

How


我可以使用crlf作为分隔符将此字段拆分为单个字符串吗?


谢谢


问候

can I split this field into individual strings using crlf as separator?

Thanks

Regards



dim结果As String()= theString.Split(Chr(13))

" sloan" < sl *** @ ipass.netwrote in message

news:%2 **************** @ TK2MSFTNGP02.phx.gbl ...
dim result As String() = theString.Split(Chr(13))
"sloan" <sl***@ipass.netwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...

>

String.Split?

http://msdn2.microsoft.com/en-us/lib...ing.split.aspx


" John" < Jo ** @ nospam.infovis.co.ukwrote in message

news:OP ************* @ TK2MSFTNGP06.phx.gbl ...
>
String.Split ?

http://msdn2.microsoft.com/en-us/lib...ing.split.aspx

"John" <Jo**@nospam.infovis.co.ukwrote in message
news:OP*************@TK2MSFTNGP06.phx.gbl...

>嗨

我有一个多行地址字段,每行由CRLF分隔。
>Hi

I have a multi-line address field which has each line separated by CRLF.



如何

How


>我可以使用crlf作为分隔符将此字段拆分为单个字符串吗? />
谢谢



>can I split this field into individual strings using crlf as separator?

Thanks

Regards




"约翰" < Jo ** @ nospam.infovis.co.ukschrieb:
"John" <Jo**@nospam.infovis.co.ukschrieb:

我有一个多行地址字段,每行由CRLF分隔。

如何使用crlf作为

分隔符将此字段拆分为单个字符串?
I have a multi-line address field which has each line separated by CRLF.
How can I split this field into individual strings using crlf as
separator?



''Microsoft.VisualBasic.Strings.Split''+''ControlChars.CrLf''是你想要的



-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/ >

VB< URL:http://dotnet.mvps.org/dotnet/faqs/>

''Microsoft.VisualBasic.Strings.Split'' + ''ControlChars.CrLf'' is what you are
looking for.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


这篇关于拆分字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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