博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

截取指定长度字符串

Posted on 2009-08-27 19:21  烈火123  阅读(156)  评论(0编辑  收藏  举报

 

方法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