截取指定长度字符串

时间:2022-12-11 22:48:15

 

方法1:

 

 

方法2:

方法3:

        private static byte[] SourceStr_Bytes;
        private static byte[] CutStr_Bytes = new byte[42];
        private static byte[] CutStr_Bytes1;
        private static int Bytes_Count = 0;
        private static string CutedStr;
        private static Encoding myEncoding = Encoding.GetEncoding("GB2312");

 

http://hi.baidu.com/linrao/blog/item/82b9178a921cf11ac8fc7ada.html