using System; using System.Collections.Generic; using System.Text; using System.Collections; using System.Text.RegularExpressions; using System.Security.Cryptography; /**/ //////////////////////////////////////////////////// ///功能:字符文本操作类 /// /// ///
SqlServer中肯定有过将表中某列的值拼接成字符串,以","或者其他符号隔开的情况吧,一般情况我们会这样做: declare @returnValue nvarchar(max)=''; select @returnValue+=','+Col1 from Table1 where .... set @returnValue=substring(@returnValue,1,len(@returnValue)-1) --去掉最前面的, 然后再将@returnValue变量的值截取,
1. String转ASCII码 public static String stringToAscii(String value) { StringBuffer sbu = new StringBuffer(); char[] chars = value.toCharArray(); for (int i = 0; i < chars.length; i++) { if (i <= chars.length - 1) { int ii = chars[i]; sbu.append(Intege