获取List中的子字符串范围 [英] Get the Range of substring in List

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

问题描述





我想获得List< string>中的字符串和位置范围

start delimter - > soap:Envelope

Ending delimter - > / soap:Envelope



例如:

Hi

i would like to get the range of string and place in List<string> where
start delimter --> soap:Envelope
Ending delimter --> /soap:Envelope

Eg:

<head>xxx</head>
<body>
xml soap:Envelope xxxx
xxxx
xxxx
xxxx
/soap:Envelope

data soap:Envelope xxxxx
xxxx
xxxx
xxxxx
/soap:Envelope
</body>

推荐答案

这看起来像XML,所以你可以使用内置的 XmlReader [ ^ ]。
This looks like XML, so you could use the built in XmlReader Class[^].


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

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