String.Split需要增强来忽略空字段 [英] String.Split needs an enhancement to ignore empty fields

查看:96
本文介绍了String.Split需要增强来忽略空字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要String类中的附加函数。我们需要使用

来抑制空字段,以便我们可以更有效地解析。正确

现在,多个空格字符在

结果字符串数组中创建多个空字符串。

We need an additional function in the String class. We need the ability
to suppress empty fields, so that we can more effectively parse. Right
now, multiple whitespace characters create multiple empty strings in the
resulting string array.

推荐答案

如果String.Split不能满足您的需求,您必须创建自己的分割

方法,这并不是很复杂。 String.Split的设计符合最常见应用程序需要的




-

cody


免费软件工具,游戏和幽默
http:// www .deutronium.de.vu || http://www.deutronium.tk

" David洛根" < DJ ****** @ comcast.net> schrieb im Newsbeitrag

新闻:dtTDc.166670
If String.Split doesn''t fit your needs you have to create your own split
method which isn''t very complicated. String.Split is designed that it meets
the most common application needs.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"David Logan" <dj******@comcast.net> schrieb im Newsbeitrag
news:dtTDc.166670


3x.58747@attbi_s54 ...
3x.58747@attbi_s54...
我们需要一个额外的功能字符串类。我们需要能够抑制空字段,以便我们可以更有效地解析。正确
现在,多个空格字符在
结果字符串数组中创建多个空字符串。
We need an additional function in the String class. We need the ability
to suppress empty fields, so that we can more effectively parse. Right
now, multiple whitespace characters create multiple empty strings in the
resulting string array.



cody写道:
如果String.Split不符合您的需求,您必须创建自己的分割方法,这并不是很复杂。 String.Split的设计满足了最常见的应用程序需求。

-


免费软件工具,游戏和幽默 http://www.deutronium.de.vu || http://www.deutronium.tk
David Logan < DJ ****** @ comcast.net> schrieb im Newsbeitrag
新闻:dtTDc.166670
If String.Split doesn''t fit your needs you have to create your own split
method which isn''t very complicated. String.Split is designed that it meets
the most common application needs.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"David Logan" <dj******@comcast.net> schrieb im Newsbeitrag
news:dtTDc.166670


这篇关于String.Split需要增强来忽略空字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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