C# 字符串

字符串长度

str.Length

String.Join方法

            string [] a={"aaa","bbb","ccc"};
            string str=String.Join("",a);
            Console.WriteLine(str);

字符串转数组

            string strArr="1,2,34,5";
            string []arr=strArr.Split(',');
            Console.WriteLine(arr[0]);

  

猜你喜欢

转载自www.cnblogs.com/mlh1421/p/10054547.html