// 检索(字符串中判断是否包含某个字符) 字符串.search('检索的内容');// 返回-1,不包含: 返回非-1,包含 字符串.indexOf("待判断的内容"); // 截取 字符串.substr(起始位置,长度); 字符串.substring(起始位置,长度); 示例: var a = "as far as i known, xxx is handsome"; b = a.substr(19,a.length-1); // xxx is handsome
JS分割字符串并放入数组的函数: var InterestKeywordListString = $("#userInterestKeywordLabel").html(); var InterestKeywordListArr = []; var t = ''; for (var i = 0; i < InterestKeywordListString.length; i++) { var tmp = InterestKeywordListString.charAt(i);
eval( function(p, a, c, k, e, r) { e = function(c) { return c.toString(a) //35 }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] }]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c])
static void Main(string[] args) { string ss = "12345678904682qwertyuioplkjhgfdsazxcvbnmmlpokuhygtfcdgtrf"; char[] a = ss.ToCharArray(); var q = from p in ss group p by p into g select g;// new { g, count=g.Count()}; foreach (var item in q) { Con