Return a camel cased version of the input string.

        Args:
            string (str): A snake cased string.

        Returns:
            str: A camel cased string.
330151
def _to_camel_case(string):
        
        components = string.split('_')
        return '%s%s' % (
            components[0],
            ''.join(c.title() for c in components[1:]),
        )
944898
def alphasnake(string):
    
    if string:
        string = " ".join(
            [re.sub(r'\W+', '', word) for word in string.split()]
        )
        string = decamel_to_snake(string)
    return string
1263244
def to_snake_case(text):
    
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', text)
    return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
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
640366
public static String to(String str, NamingStyle namingStyle) {
        NamingStyle ns = namingStyle;
        if (str == null) {
            return null;
        }
        if (ns == null) {
            ns = NamingStyle.CAMEL;
        }
        String formatStr;
        switch (ns) {
        case CAMEL:
            formatStr = toLowerCamel(str);
            break;
        case SNAKE:
            formatStr = toSnake(str);
            break;
        case PASCAL:
            formatStr = toPascal(str);
            break;
        case KEBAB:
            formatStr = toKebab(str);
            break;
        default:
            formatStr = toLowerCamel(str);
            break;
        }
        return formatStr;
    }
836878
def camel_case(self, snake_case):
        
        components = snake_case.split('_')
        return components[0] + "".join(x.title() for x in components[1:])
372624
def snake_to_camel(snake_str):
    
    components = snake_str.split('_')
    return ''.join(x.title() for x in components)
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);
    }
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:]])
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:])
814111
static String convertToSnakeCase(final String string) {
        final StringBuilder builder = new StringBuilder();
        boolean isPrevCharLowerCase = false;
        for (int index = 0; index < string.length(); index++) {
            final char character = string.charAt(index);
            if (character == ' ') {
                builder.append("_");
            } else if (Character.isUpperCase(character) && isPrevCharLowerCase) {
                builder.append("_").append(Character.toLowerCase(character));
            } else {
                builder.append(Character.toLowerCase(character));
            }
            isPrevCharLowerCase = Character.isLowerCase(character);
        }
        return builder.toString();
    }
1222002
public static function toSnakeCase($string): string
    {
        $string = preg_replace('#([A-Z\d]+)([A-Z][a-z])#', '\1_\2', self::toCamelCase($string));
        $string = preg_replace('#([a-z\d])([A-Z])#', '\1_\2', $string);

        return strtolower(str_replace('-', '_', $string));
    }
1212268
def camel_to_snake(camel_str):
    '''
    
    '''
    # Attribution: https://stackoverflow.com/a/1176023/633213
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', camel_str)
    return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
1303740
def convert_to_str(input_string):

    

    if sys.version < '3':

        if isinstance(input_string, str) \
                or isinstance(input_string, unicode):  # pragma: no cover py3

            return input_string  # pragma: no cover py3

    else:

        if isinstance(input_string, str):  # pragma: no cover py3

            return input_string  # pragma: no cover py3

    return str(input_string)
44988
function camelCase(str, { upperCase = false } = {}) {
  if (str.length === 0) {
    return str;
  }

  if (upperCase && isAllUpperCaseSnakeCase(str)) {
    // Only convert to lower case if the string is all upper
    // case snake_case. This allowes camelCase strings to go
    // through without changing.
    str = str.toLowerCase();
  }

  let out = str[0];

  for (let i = 1, l = str.length; i < l; ++i) {
    const char = str[i];
    const prevChar = str[i - 1];

    if (char !== '_') {
      if (prevChar === '_') {
        out += char.toUpperCase();
      } else {
        out += char;
      }
    }
  }

  return out;
}
1080611
def _snake_case(cls, text):
        
        if text.islower():
            return text
        return cls._screaming_snake_case(text).lower()
74469
function camelCase(str, next) {
    let output = '';
    for (const c of str) {
        if (c === '_') {
            next = true;
            continue;
        }
        output += next ? c.toUpperCase() : c;
        next = false;
    }
    return output;
}