<笔记>如何分割string
来源:互联网 发布:流固耦合软件 编辑:程序博客网 时间:2024/06/09 17:24
class TestStringSplit{ static void Main() { char[] delimiterChars = { ' ', ',', '.', ':', '\t' }; string text = "a\tb c:d,e f g"; System.Console.WriteLine("Original text: '{0}'", text); string[] words = text.Split(delimiterChars); System.Console.WriteLine("{0} words in text:", words.Length); foreach (string s in words) { System.Console.WriteLine(s); } // Keep the console window open in debug mode. System.Console.WriteLine("Press any key to exit."); System.Console.ReadKey(); }}/* Output: a b c d e f g */
As input, Split takes an array of chars that indicate which characters are to be used as delimiters.
- <笔记>如何分割string
- 在PL/SQL中如何分割字符串(Split String)
- 如何利用String.Split()对字符串进行分割
- android学习笔记19 - 字符串String的截取、分割、替换
- String分割方法总结
- string中文分割
- C++ string 分割字符
- c++中的string分割
- String 分割(备忘)
- String的分割
- string 字符串分割
- String.split() 字符串分割
- [C++]string分割字符串
- C++ string 分割字符
- java ,String分割字符串
- C++ -- string分割
- string转换和分割
- std::string字符串分割
- 深入浅出MIPS 0 序章
- 源文件到目标文件的过程
- windows文件中的中文在ubuntu下乱码(小弟参考了许多都不行,这个绝对行啊)
- linux socket编程TCP缓冲区详解
- ursor 与refcursor及sys_refcursor的区别
- <笔记>如何分割string
- ios开发中如何隐藏各种bar
- 设置IOS中状态栏的状态
- 数字转换成汉字大写
- 优化Stack Trace 崩溃的显示 转自 唐巧
- SpringMVC笔记之HandlerInterceptorAdapter异常处理
- Android 关于新浪微博字数的处理
- SVN的配置和使用方法【服务器端】
- ofbiz之服务实体api积累