string split 相关知识

      string test = "程$晓$";
        //数组长度为2 temp[0]="程"
temp[1]="晓";
        string[] temp = test.Split(new string[] { "$" },
StringSplitOptions.RemoveEmptyEntries);
        //数组长度为3 temp[0]="程"
temp[1]="晓" temp[2]="";
        string[] temp = test.Split(new string[] { "$"
}, StringSplitOptions.None);

 

ASP:

 

  语法

 

  返回值数组 = Split("字符串","分割符")

 

  示例:

 

  Ctext=Split("你好|早上好|中午好","|")

 

posted @ 2012-08-02 15:59  小薇林  阅读(134)  评论(0编辑  收藏  举报