中划线'-'后的字符转大写
@param {string} str
@return {string}
@example
Handlebars.compile('{{hyphenToCamel "--a-b-c--"}}')() // => "ABC"
Handlebars.compile('{{hyphenToCamel "a---b---c"}}')() // => "ABC"
425457
function hyphenToCamel(str) {
  if (!str) {
    return console.error('错误: hyphenToCamel 方法需要传入字符串类型的值');
  }
  return str.split('-').map(x => {
    return x.charAt(0).toUpperCase() + x.slice(1);
  }).join('');
}
405439
function (str) {
        return btoa(String.fromCharCode.apply(null,
            str.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" "))
        );
    }
66705
function(str) {
		var xmlEncodeChars = {'<' : 'lt', '>' : 'gt', '&' : 'amp', '"' : 'quot', '\'' : '#39'}, xmlEncodeRegExp = /[<>&\"\']/g;

		return str ? ('' + str).replace(xmlEncodeRegExp, function(chr) {
			return xmlEncodeChars[chr] ? '&' + xmlEncodeChars[chr] + ';' : chr;
		}) : str;
	}
916887
public static boolean findChinese(String str) {
        Matcher m = pattern.matcher(str);
        return m.find();
    }
1324526
function(str){
            str = (str || "").toString();
            str = str.replace(/\=(?:\r?\n|$)/g, "");
            var str2 = "";
            for(var i=0, len = str.length; i<len; i++){
                chr = str.charAt(i);
                if(chr == "=" && (hex = str.substr(i+1, 2)) && /[\da-fA-F]{2}/.test(hex)){
                    str2 += String.fromCharCode(parseInt(hex,16));
                    i+=2;
                    continue;
                }
                str2 += chr;
            }
            return str2;
        }
916090
function parse(str) {
	str = '(' + str.trim() + ')';

	/**
	 * expr
	 */

	return expr();

	/**
	 * Assert `expr`.
	 */

	function error(expr, msg) {
		if (expr) return;
		var ctx = str.slice(0, 10);
		assert(0, msg + ' near `' + ctx + '`');
	}

	/**
	 * '(' binop ')'
	 */

	function expr() {
		error('(' == str[0], "missing opening '('");
		str = str.slice(1);

		var node = binop();

		error(')' == str[0], "missing closing ')'");
		str = str.slice(1);

		return node;
	}

	/**
	 * field | expr
	 */

	function primary() {
		return field()
			|| expr();
	}

	/**
	 * primary (OR|AND) binop
	 */

	function binop() {
		var left = primary();

		var m = str.match(/^ *(OR|AND) */i);
		if (!m) return left;

		str = str.slice(m[0].length);

		var right = binop();

		return {
			type: 'op',
			op: m[1].toLowerCase(),
			left: left,
			right: right
		}
	}

	/**
	 * FIELD[:VALUE]
	 */

	function field() {
		var val = true;
		var m = str.match(/^([-.\w]+)/);
		if (!m) return;

		var name = m[0];
		str = str.slice(name.length);

		var m = str.match(/^:([-*\w.]+|".*?"|'.*?'|\/(.*?)\/) */);
		if (m) {
			str = str.slice(m[0].length);
			val = m[1];
			if (numeric(val)) val = parseFloat(val);
		}

		return {
			type: 'field',
			name: name,
			value: coerce(val)
		}
	}
}
1120497
function camelCase(str) {
  if (str.indexOf('_') > -1) {
    str = str.replace(/_(\w)/g, (a, b) => {
      return b.toUpperCase();
    });
  }
  return str;
}
1067500
function attrsStringify(node, doc, clsSet){
	let attrs = node.attrs;
	if ( !attrs ) {
		node.x = 1;
		return null;
	}

	let kvs = [];
	let objs = [];
	let cls = {};
	let staticAttrs = true;

    // 含ref属性时，自动添加$context属性，避免组件对象上下文混乱，深度slot内的标签含ref属性时特需
    attrs['@ref'] && ((attrs.ref = attrs['@ref']) > delete attrs['@ref'] );     // 支持@ref属性，转换为ref
    attrs.ref && (attrs.$context = '{=$this}');

	for ( let k in attrs ) {
		if ( (k.startsWith(options.ExpressionStart) && k.endsWith(options.ExpressionEnd)) || (k.startsWith(options.ExpressionUnescapeStart) && k.endsWith(options.ExpressionUnescapeEnd)) ) {
			// 键名是表达式，是个单纯的属性键值对象 <tag {prop} />
			let expr = util.getExpression(k);
			//expr.startsWith('(')
			objs.push(expr.startsWith('(') ? expr : expr.substring(expr.indexOf('('))); // escapeHtml(....) => (....)
			staticAttrs = false;
		}else{
			if ( attrs[k] === true ) {
				// 这是个无值的字符串属性，通常是readonly之类，在m220-syntax-ast中补充赋值的true
				kvs.push('"' + k + '": 1'); // 用1代表true
			}else{
				let ary = [];
				let espAttr = escapeAttrExpr(attrs[k].trim());				// 把【\{】和【\}】替换为两位特殊字符，避免误当表达式解析
				parseExpression(ary, espAttr);								// 解析表达式
				let expr = '(' + unescapeAttrExpr(ary.join(' + ')) + ')';	// 把【\{】和【\}】替换回来

				if ( k == 'class' ) {
					kvs.push('"' + k + '": ' + classStrToObjectString(attrs[k], doc, clsSet) );  // class="abc def {bar:!bar}" => {class:{abc:1, def:1, bar:!bar}}
				}else{
					kvs.push('"' + k + '": ' + expr);
				}

				if ( staticAttrs && attrs[k].indexOf(options.ExpressionStart) >=0 || attrs[k].indexOf(options.ExpressionUnescapeStart) >=0 ) {
					staticAttrs = false; // 键值中含表达式
				}
			}
		}
	}

	if ( staticAttrs ) {
		node.x = 1; // 这个节点的属性是静态的，后续可利用这个标记省略比较属性是否有变化
	}

	let rs = '{' + kvs.join(',') + '}';
	if ( objs.length ) {
		rs = `rpose.assign(${rs}, ${objs.join(',')})`;
	}
	return rs;
}
897159
function(str) {
    var startsWith = !_.isNull(str.match(sOpsHeadRe))
    return startsWith & cons.isLegalSentence(str)
  }
407188
function (source) {

                var str = String(source)
                    .replace(/&quot;/g, '"')
                    .replace(/&lt;/g, '<')
                    .replace(/&gt;/g, '>')
                    .replace(/&amp;/g, '&');

                // 处理转义的中文和实体字符
                return str.replace(/&#([\d]+);/g, function ($0, $1) {
                    return String.fromCharCode(parseInt($1, 10));
                });
            }
1059824
function camelCase (str) {
  return str
    .replace(/_/g, (_, index) => index === 0 ? _ : '-')
    .replace(/(?:^\w|[A-Z]|\b\w)/g, (letter, index) =>
      index === 0 ? letter.toLowerCase() : letter.toUpperCase()
    )
    .replace(invalidChars, '')
}
61494
function unescapeString(str) {
    let i = 0, result = '';
    const len = str.length;

    while (i < len) {
        const ch = str[i++];
        result += (ch === '\\') ? (str[i++] || '') : ch;
    }

    return result;
}
267276
function (str) {
            var values, r, g, b, a = 1;
            if ((str.length === 4 || str.length === 7) && str.substr(0, 1) === '#') {
                values = str.match(hexRe);
                if (values) {
                    r = parseHex(values[1]);
                    g = parseHex(values[2]);
                    b = parseHex(values[3]);
                    if (str.length === 4) {
                        r = paddingHex(r);
                        g = paddingHex(g);
                        b = paddingHex(b);
                    }
                }
            } else {
                values = str.match(rgbaRe);
                if (values) {
                    r = parseInt(values[1], 10);
                    g = parseInt(values[2], 10);
                    b = parseInt(values[3], 10);
                    a = parseFloat(values[4]) || 1;
                }
            }
            return typeof r === 'undefined' ? undefined : new Color({
                r: r,
                g: g,
                b: b,
                a: a
            });
        }
398002
function convertPrefix(str) {
    var res = new Array(str.length);
    for (var i = 0; i < str.length; ++i)
        res[i] = str[i] === '1';
    return res;
}
538609
function(str) {
    return (_.startsWith(str, '"') && _.endsWith(str, '"') && !_.includes(_.trim(str, '"'), '"')) ||
      (_.startsWith(str, "'") && _.endsWith(str, "'") && !_.includes(_.trim(str, "'"), "'"))
  }
270551
function( str ){
      var first, last;

      // find first non-space char
      for( first = 0; first < str.length && str[first] === ' '; first++ ){}

      // find last non-space char
      for( last = str.length - 1; last > first && str[last] === ' '; last-- ){}

      return str.substring(first, last + 1);
    }
21790
function camelCase(str) {
    return str
        .replace(/[-_\s]+(.)/gu, (_, c) => c.toUpperCase())
        .replace(/^./u, c => c.toLowerCase())
}