- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Data;
-
- namespace Study
- {
- public static class Program3
- {
- static void Main(string[] args)
- {
- Proccess(@"13212345671,13312345672, 13412345674
- 13212345674,");
- Proccess("");
- Proccess(null);
- Console.Read();
- }
-
- public static void Proccess(string str)
- {
-
-
-
- string[] arr = (str ?? string.Empty).Split(new char[] { ',', '\t', '\n', ' ' }, StringSplitOptions.RemoveEmptyEntries);
- Console.WriteLine("本次切分后数组的长度为:{0}", arr.Length);
- int i = 1;
- foreach (string s in arr)
- {
- Console.WriteLine("{0}:{1}", (i++).ToString(), s);
- }
- }
- }
- }
posted @
2015-06-28 12:03
大林just
阅读(
2939)
评论()
编辑
收藏
举报