"fooBar" -> "FOOBar"
"FooBar" -> "FOOBar"
"foo" -> "FOO"
182418
static String capitalizeFirstWordAsciiOnly(String s) {
    if (s == null || s.isEmpty()) {
      return s;
    }
    int secondWordStart = s.length();
    for (int i = 1; i < s.length(); i++) {
      if (!isLowerCaseAsciiOnly(s.charAt(i))) {
        secondWordStart = i;
        break;
      }
    }
    return toUpperCaseAsciiOnly(s.substring(0, secondWordStart)) + s.substring(secondWordStart);
  }
1280862
function (text, replacements) {
        'use strict';
        var keys = getKeysFromTemplate(text),//Object.keys(replacements),
            len = keys.length,
            i = 0,
            key,
            value;
        while (i < len) {
            key = keys[i];
            if (key.indexOf('.') !== -1) {
                value = getNestedValue(replacements, key);
            } else {
                value = replacements[key];
            }
            if (value) {
                text = text.split('{' + key + '}').join(value);
            }
            i += 1;
        }
        return text;
    }
1272721
function ucFirst( str ) {
		str += '';
		var f = str.charAt( 0 ).toUpperCase();
		return f + str.substr( 1 );
	}
86733
def -(other)
      other = other.to_key_path
      raise KeyError unless prefix?(other)

      super(other.length)
    end
189404
function EE(fn, context, once) {
  this.fn = fn;
  this.context = context;
  this.once = once || false;
}
392090
function combineHeaders(...args) {
  const combinedLower = {};
  const combined = {};
  args.reverse();
  args.forEach((headers) => {
    if (headers) {
      Object.keys(headers).forEach((name) => {
        const nameLower = name.toLowerCase();
        if (!hasOwnProperty.call(combinedLower, nameLower)) {
          combinedLower[nameLower] = true;
          combined[name] = headers[name];
        }
      });
    }
  });
  return combined;
}
1339156
function Matcher (patternFn, successFn, next) {
    this.patternFn = patternFn;
    this.successFn = successFn;
    this.next = next;
  }
318851
function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $nspace, $current_nspace )
    {
        switch ( $functionName )
        {
            case $this->LName:
            {
                $textElements[] = $tpl->leftDelimiter();
            } break;
            case $this->RName:
            {
                $textElements[] = $tpl->rightDelimiter();
            } break;
        }
    }
669019
function commonPrefixOf (a, b) { // eslint-disable-line id-length
  const minLen = Math.min(a.length, b.length)
  let i = 0
  for (; i < minLen; ++i) {
    if (a[i] !== b[i]) {
      break
    }
  }
  return a.substring(0, i)
}
668431
function (text, arg1, arg2, arg3) {
    text = translateWord(text);

    var pos = text.indexOf('%s');
    if (pos !== -1) {
        text = text.replace('%s', arg1);
    } else {
        return text;
    }

    pos = text.indexOf('%s');
    if (pos !== -1)  {
        text = text.replace('%s', arg2);
    } else {
        return text;
    }

    pos = text.indexOf('%s');
    if (pos !== -1)  {
        text = text.replace('%s', arg3);
    }

    return text;
}
86132
def b(memo, other)
      other.keys.each do |sort|
        if keys.include?(sort) && !memo.keys.include?(sort)
          memo << other.assoc(sort)
        end
      end
    end
701132
function toModelName(input) {
  input = toSQLName(input);

  return !input ? undefined : input.replace(/_([a-z])/g, function (g) {
    return g[1].toUpperCase();
  });
}
1259410
function(obj_) {
  var obj = sg.smartAttrs(obj_ || {});

  if (!obj.tags)              { return obj; }

  var arr = obj.tags;
  if (_.isString(obj.tags)) {
    arr = obj.tags.split(/[, ]+/g);
  }

  // Turn a string into tags: 'foo, bar, baz=quxx'
  obj.tags = sg.reduce(arr, {}, function(m, str) {
    var result   = {};
    var parts    = str.split(/[=] ?/g);
    var key      = parts.shift();

    if (parts.length <= 0) {
      return sg.kv(m, key, true);
    }

    return sg.kv(m, key, parts.join('='));
  });

  return obj;
}
658638
function mixin(a, b) {
  Object.keys(b).forEach(function(key) {
    a[key] = b[key];
  });
}
343715
private boolean substitute() {
		boolean madeChange = false;

		for (String key : backing.keySet()) {
			madeChange = madeChange || substitute(key);
		}

		return madeChange;
	}
756895
def autor (autor)
			str=""
			autor.each do |a|
				separar = a.split(/\W+/)
				str+=separar[1]
				str+=", "
				unless separar[2].nil?
					str+=separar[2][0]
					str+=". "
				end
				str+=separar[0][0]
				str+="."
				str+=" & " unless a == autor.last
			end
			@autor = str
		end
223998
function(attr, keepKey) {
                        //Keep key intact
                        if (keepKey) {
                            return [attr];
                        }
                        // Split key on '.'
                        return can.isArray(attr) ? attr : ("" + attr)
                            .split(".");
                    }