convert string to camelcase
517571
function toCamel(string) {
        if (string === null || string === undefined) {
            return "";
        }
        return String(string).replace(/((\s|\-|\.)+[a-z0-9])/g, function($1) {
            return $1.toUpperCase().replace(/(\s|\-|\.)/g, "");
        });
    }
58502
function camelCase(s) {
  return s.toLowerCase().replace(/-(.)/g, function(m, g) {
    return g.toUpperCase()
  })
}
949661
def camel_case_from_underscores(string):
    """"""
    components = string.split('_')
    string = ''
    for component in components:
        string += component[0].upper() + component[1:]
    return string
717153
function camelCase(s) {
    // Convert first character to lowercase
    return s.replace(/^\w/, function (match) {
        return match.toLowerCase();
    })
    .replace(/-\w/g, function (match) {
        return match.charAt(1).toUpperCase();
    });
}
995234
def camelize(term)
      string = term.to_s
      string = string.sub(/^[a-z\d]*/) { $&.capitalize }
      string.gsub(/(?:_|(\/))([a-z\d]*)/i) { $2.capitalize }.gsub('/', '::')
    end
757309
function _camelcase(flag) {
  return flag.split('-').reduce(function (str, word) {
    return str + word[0].toUpperCase() + word.slice(1);
  });
}
1211965
def camelise(text, capital_first=True):
    """"""

    def camelcase():
        if not capital_first:
            yield str.lower
        while True:
            yield str.capitalize

    if istype(text, 'unicode'):
        text = text.encode('utf8')
    c = camelcase()
    return "".join(next(c)(x) if x else '_' for x in text.split("_"))
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();
  });
}
849028
function camelise(str) { var re
        re = /[\s\-_]+(\w)/g
        return downcase(str).replace(re, function(match, letter) {
            return upcase(letter) })
    }
1042515
function camelCase(name) {
  return name.
    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
      return offset ? letter.toUpperCase() : letter;
    }).
    replace(MOZ_HACK_REGEXP, 'Moz$1');
}
417774
def underscore_to_camelcase(underscore_string)
      underscore_string = underscore_string.gsub(/(_)/,' ').split(' ').each { |word| word.capitalize! }.join("") unless underscore_string.match(/_/).nil?
      underscore_string = underscore_string if underscore_string.match(/_/).nil?
      return underscore_string
    end
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:]])
1124398
def title_case(string):
    
    if not string:
        return string
    string = string.replace('_', ' ').replace('-', ' ')
    parts = de_camel(string, ' ', _lowercase=False).strip().split(' ')
    return ' '.join([part if part.isupper() else part.title()
                     for part in parts])
6635
private static String camelFormat(String str, boolean isFirstCapitalized) {
		StringBuilder builder = new StringBuilder(str.length());
		String[] tokens = NOT_ALPHANUMERIC_REGEX.split(str);
		for (int i = 0; i < tokens.length; i++) {
			String lowerCased = StringUtils.lowerCase(tokens[i]);
			if (i == 0) {
				builder.append(isFirstCapitalized ? StringUtils.capitalize(lowerCased) : lowerCased);
			} else {
				builder.append(StringUtils.capitalize(lowerCased));
			}
		}
		return builder.toString();
	}
1169183
def camelcase(string):
    '''
    '''
    out = slug(string).replace('-', ' ').title().replace(' ', '')
    return out[0].lower() + out[1:]
1044360
public static function camelcaseToSnakecase(string $string): string
    {
        preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $string, $matches);

        $words = $matches[0];
        foreach ($words as &$word) {
            $word = ($word == strtoupper($word))
                ? strtolower($word)
                : lcfirst($word);
        }

        return implode('_', $words);
    }
414467
function camelCase(str) {
  if (str.indexOf('-') > -1) {
    str = str.replace(/-\w/g, function (letter) {
      return letter.substr(1).toUpperCase();
    });
  }

  return str;
}