camelCaseToDashName - Convert a camel case name to a dash-name (like paddingTop to padding-top)

            @param camelCase <str> - A camel-case string

            @return <str> - A dash-name
427465
def camelCaseToDashName(camelCase):
        '''
            
        '''

        camelCaseList = list(camelCase)

        ret = []

        for ch in camelCaseList:
            if ch.isupper():
                ret.append('-')
                ret.append(ch.lower())
            else:
                ret.append(ch)

        return ''.join(ret)
1040510
def camelcase_to_underscores(argument):
    ''' '''
    result = ''
    prev_char_title = True
    if not argument:
        return argument
    for index, char in enumerate(argument):
        try:
            next_char_title = argument[index + 1].istitle()
        except IndexError:
            next_char_title = True

        upper_to_lower = char.istitle() and not next_char_title
        lower_to_upper = char.istitle() and not prev_char_title

        if index and (upper_to_lower or lower_to_upper):
            # Only add underscore if char is capital, not first letter, and next
            # char is not capital
            result += "_"
        prev_char_title = char.istitle()
        if not char.isspace():  # Only add non-whitespace
            result += char.lower()
    return result
603247
function dashify( prop ) {
  if (!prop) {
    return '';
  }

  // Replace upper case with dash-lowercase,
  // then fix ms- prefixes because they're not capitalized.
  return prop.replace(/([A-Z])/g, function( str, m1 ) {
    return '-' + m1.toLowerCase();
  }).replace(/^ms-/,'-ms-');
}
1349177
def camel_case_to_under_score(camel_case_name):
    
    result = []
    for letter in camel_case_name:
        if letter.lower() != letter:
            result.append("_" + letter.lower())
        else:
            result.append(letter.lower())
    if result[0].startswith("_"):
        result[0] = result[0][1:]
    return "".join(result)
229823
protected static String toInternalName(String name, boolean keepCase)
    {
        return keepCase ? name : name.toLowerCase(Locale.US);
    }
1189126
public static String unStudlyName (String name)
    {
        boolean seenLower = false;
        StringBuilder nname = new StringBuilder();
        int nlen = name.length();
        for (int i = 0; i < nlen; i++) {
            char c = name.charAt(i);
            // if we see an upper case character and we've seen a lower case character since the
            // last time we did so, slip in an _
            if (Character.isUpperCase(c)) {
                if (seenLower) {
                    nname.append("_");
                }
                seenLower = false;
                nname.append(c);
            } else {
                seenLower = true;
                nname.append(Character.toUpperCase(c));
            }
        }
        return nname.toString();
    }
55883
function camelcase(flag) {
  return flag.split('-').reduce(function(str, word){
    return str + word[0].toUpperCase() + word.slice(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
58502
function camelCase(s) {
  return s.toLowerCase().replace(/-(.)/g, function(m, g) {
    return g.toUpperCase()
  })
}
271734
private static String hyphenatedToCamelCase(String s) {
        Matcher m = Pattern.compile("(?:^|-)([a-z])").matcher(s);
        StringBuilder b = new StringBuilder();
        int last = 0;
        for (; m.find(); last = m.end()) {
            b.append(s, last, m.start()).append(Character.toUpperCase(m.group(1).charAt(0)));
        }
        return b.append(s, last, s.length()).toString();
    }
552338
String getName(TypeName typeName) {
    String name = typeToNames.get(typeName);
    if (name != null) {
      return name;
    }
    name = getNameInternal(typeName);
    name = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, name);
    name = adapterNames.getUniqueName(name);
    typeToNames.put(typeName, name);
    return name;
  }
46974
def to_camel_case(s):
    

    def to_upper(match):
        return match.group(0)[-1].upper()

    return re.sub('(^|[_\W])+[a-zA-Z]', to_upper, s)
951012
def camel_case_to_name(name):
    
    def convert_func(val):
        return "_" + val.group(0).lower()
    return name[0].lower() + re.sub(r'([A-Z])', convert_func, name[1:])
606726
def camelcase_underscore(name):
    
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
    return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
492655
def camel_to_snake_case(name):
    """"""
    pattern = r'[A-Z][a-z]+|[A-Z]+(?![a-z])'
    return '_'.join(map(str.lower, re.findall(pattern, name)))
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:])
535927
private static String camelCaseToSentenceCase(String camelCase) {
        String name = StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(camelCase), " ");
        return name.substring(0, 1).toUpperCase(Locale.ENGLISH) + name.substring(1)
                .toLowerCase(Locale.ENGLISH);
    }