将字符串分割的所有空白 [英] Splitting a string at all whitespace

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

问题描述

我需要在所有的空格分割字符串,它应该只包含文字本身。

I need to split a string at all whitespace, it should ONLY contain the words themselves.

我怎样才能做到这一点在vb.net?

How can I do this in vb.net?

制表符,换行符等必须全部拆!

Tabs, Newlines, etc. must all be split!

这已被窃听了我相当长的一段时间了,因为我的语法高亮我做完全忽略每行除了第一行第一个字。

This has been bugging me for quite a while now, as my syntax highlighter I made completely ignores the first word in each line except for the very first line.

推荐答案

String.Split()(无参数)并分割上的所有空白(包括LF / CR)

String.Split() (no parameters) does split on all whitespace (including LF/CR)

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

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