全角:指一个字符占用两个标准字符位置:半角:指一字符占用一个标准的字符位置. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ExtensionMethodsDemo { static class Program { static void Main(string[] args) { string input = "深圳狐狼,你是好人!".To
//全角转半角 function CtoH(str){ var result=""; for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<