Returns a camel-cased version of a string.

    :param a_string: any :class:`str` object.

    Usage:
        >>> camel_case('foo_bar')
        "fooBar"
350722
def camel_case(snake_str):
    

    components = snake_str.split('_')
    # We capitalize the first letter of each component except the first one
    # with the 'title' method and join them together.
    return components[0] + "".join(x.title() for x in components[1:])
1126692
static function CamelCase($string) {
		$string = preg_replace_callback('#([_])(\w)#', function ($m) {
			return strtoupper($m[2]);
		}, strtolower($string));

		return ucfirst($string);
	}
587743
def camelize(term, uppercase_first_letter = true)
      string = term.to_s
      string = if uppercase_first_letter
        string.sub(/^[a-z\d]*/, &:capitalize)
      else
        string.sub(/^((?=\b|[A-Z_])|\w)/, &:downcase)
               end
      string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{Regexp.last_match(1)}#{Regexp.last_match(2).capitalize}" }
      string.gsub!('/'.freeze, '::'.freeze)
      string
    end
836878
def camel_case(self, snake_case):
        
        components = snake_case.split('_')
        return components[0] + "".join(x.title() for x in components[1:])
668640
def kebab_case(string):
    
    if not string:
        return string
    string = string.replace('_', '-').replace(' ', '-')
    return de_camel(string, '-')
1069477
def camelize(string, lower = false)
      string = string.to_s.gsub(/(?:^|_)(.)/) { Regexp.last_match(1).upcase }
      string = string[0].chr.downcase + string[1..-1] if lower
      string
    end
996885
def snake_case(a_string):
    

    partial = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', a_string)
    return re.sub('([a-z0-9])([A-Z])', r'\1_\2', partial).lower()
1136120
def snake_case(string):
    
    if not string:
        return string
    string = string.replace('-', '_').replace(' ', '_')
    return de_camel(string)
290130
protected String changeCase(String originalString, String mode) {
		String targetString = originalString;
		// mode is case insensitive, allow upper for example
		CaseFormatMode changeCaseMode = CaseFormatMode.get(mode.toUpperCase());
		if (changeCaseMode != null) {
			switch (changeCaseMode) {
			case LOWER_CAMEL_CASE:
				targetString = camelFormat(originalString, false);
				break;
			case UPPER_CAMEL_CASE:
				targetString = camelFormat(originalString, true);
				break;
			case SNAKE_CASE:
			case LOWER_UNDERSCORE:
				targetString = caseFormatWithDelimiter(originalString, UNDERSCORE, false, true);
				break;
			case KEBAB_CASE:
			case LISP_CASE:
			case SPINAL_CASE:
			case LOWER_HYPHEN:
				targetString = caseFormatWithDelimiter(originalString, HYPHEN_MINUS, false, true);
				break;
			case TRAIN_CASE:
				targetString = caseFormatWithDelimiter(originalString, HYPHEN_MINUS, true, false);
				break;
			case UPPER_UNDERSCORE:
				targetString = caseFormatWithDelimiter(originalString, UNDERSCORE, true, false);
				break;
			default:
				// default not doing nothing to originalString
			}
		} else {
			LOGGER.error("Unknown mode {}, returning {} unchanged", mode, targetString);
		}
		return targetString;
	}
1370627
def format_camel_case(text):
    
    text = text.strip()
    if len(text) == 0:  # if empty string, return it
        raise ValueError("can not be empty string!")
    else:
        text = text.lower()  # lower all char
        # delete redundant empty space
        words = list()
        word = list()
        for char in text:
            if char in ALPHA_DIGITS:
                word.append(char)
            else:
                if len(word):
                    words.append("".join(word))
                    word = list()
        if len(word):
            words.append("".join(word))

        words = [word[0].upper() + word[1:] for word in words]
        return "".join(words)
744757
def to_camel_case(snake_case_string):
    
    parts = snake_case_string.lstrip('_').split('_')
    return parts[0] + ''.join([i.title() for i in parts[1:]])
1059530
function camelCase(string) {
  if (typeof string !== 'string') {
    throw new TypeError('First argument must be a string');
  }

  // custom property or no hyphen found
  if (CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX.test(string)) {
    return string;
  }

  // convert to camelCase
  return string
    .toLowerCase()
    .replace(hyphenPatternRegex, function(_, character) {
      return character.toUpperCase();
    });
}
779609
function camelcase(str) {
  if (!/[\s\W]/.test(str)) return str;
  if (str.length === 1) {
    return str.toLowerCase();
  }
  str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase();
  return str.replace(/[\W_]+(\w|$)/g, function(_, ch) {
    return ch.toUpperCase();
  });
}
390551
function camelCase(str) {
            return str.replace(reMs, "ms-").replace(reSnakeCase, function (all, letter) {
                return letter.toUpperCase();
            });
        }
743651
def to_snake_case(camel_case_string):
    
    first_pass = _first_camel_case_regex.sub(r'\1_\2', camel_case_string)
    return _second_camel_case_regex.sub(r'\1_\2', first_pass).lower()
973023
def snake_case_to_camel_case(value)
      pieces = value.to_s.split '_'

      (pieces.first + pieces[1..-1].map(&:capitalize).join).to_sym
    end
753356
def _snake_to_camel_case(value):
    """"""
    words = value.split("_")
    return words[0] + "".join(map(str.capitalize, words[1:]))