如何拆分此字符串并将其放入数组中,可以是换行符还是换行符
这是 api 网址
https://stats.nba.com/stats/draftcombinenonstationaryshooting https://stats.nba.com/stats/draftcombinenonstationaryshooting https://stats.nba.com/stats/boxscoreplayertrackv2
我尝试使用但字符串将其放在索引 0 中
string[] lines = split.Split(
new[] { Environment.NewLine },
StringSplitOptions.None
);
我想从字符串中获取每个单独的链接并存储在一个数组中
源码链接:any-api.com
您也可以Split()
不带任何参数调用,在这种情况下,它将拆分为空白字符,因此您的示例代码可以简单地简化为:
string[] lines = split.Split();
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句