Convert a string with dashes to camel case
@param dashCase
348414
function dashToCamelCase(dashCase) {
    if (!dashCase) { return dashCase; }

    var parts = dashCase.split('-');
    var camelCase = parts[0];
    var part;

    for (var i = 1; i < parts.length; i++) {
        part = parts[i];
        camelCase += part.substring(0, 1).toUpperCase() + part.substring(1);
    }

    return camelCase;
}
733964
public static final String camelCase(String string) {

		StringBuilder sb = new StringBuilder();

		boolean upperFlag = false;

		for (int i = 0; i < string.length(); i++) {
			char ch = string.charAt(i);
			if (ch == '-')
				upperFlag = true;
			else if (upperFlag && Character.isLetter(ch)) {
				sb.append(Character.toUpperCase(ch));
				upperFlag = false;
			} else if (!upperFlag && Character.isLetter(ch))
				sb.append(ch);
			else if (ch == '_') // vendor extension
				sb.append(ch);
		}
		return sb.toString();
	}
688050
def camel_case_to_underscore(name):
    """"""
    res = RE_TOKEN1.sub(r'\1_\2', name)
    res = RE_TOKEN2.sub(r'\1_\2', res)
    return res.lower()
729441
def dash(value)
      case value
      when Hash then value.deep_transform_keys! { |key| dash(key) }
      when Symbol then dash(value.to_s).to_sym
      when String then StringSupport.dash(value)
      else value
      end
    end
587558
public static String hyphenCaseToCamelCase(String s) {

        List<String> words = Stream.of(s.split("-")).filter(w -> !"".equals(w)).collect(Collectors.toList());

        if (words.size() < 2) {
            return s;
        }

        StringBuilder parsedString = new StringBuilder(words.get(0));

        for (int i = 1; i < words.size(); i++) {

            parsedString.append(Character.toUpperCase(words.get(i).charAt(0))).append(words.get(i).substring(1));
        }

        return parsedString.toString();
    }
1265931
public static String firstPartOfCamelCase(String camelcased) {
        // by starting to count before the isUpperCase-check,
        // we do not care if the strings starts with a lower- or uppercase
        int end = 0;
        while (++end < camelcased.length()) {
            if (Character.isUpperCase(camelcased.charAt(end)))
                break;
        }
        return camelcased.substring(0,end);
    }
107519
def split_camel_case(text) -> list:
    """"""
    return list(reduce(
        lambda a, b: (a + [b] if b.isupper() else a[:-1] + [a[-1] + b]),
        text,
        []
    ))
58502
function camelCase(s) {
  return s.toLowerCase().replace(/-(.)/g, function(m, g) {
    return g.toUpperCase()
  })
}
889218
def camel_case_from_underscores(string):
    """"""

    components = string.split('_')
    string = ''

    for component in components:
        if component in abbreviations:
            string += component
        else:
            string += component[0].upper() + component[1:].lower()

    return string
162587
func Camelcase(s string, v ...interface{}) string {
	return name.CamelCase(fmt.Sprintf(s, v...), true)
}
589684
function camelCase (str, capitaliseLead = false) {
  str = str.replace(/_([a-z])/g, (group) => {
    if (group[1]) {
      return group[1].toUpperCase()
    }
  })
  if (capitaliseLead) {
    return str.charAt(0).toUpperCase() + str.slice(1)
  } else {
    return str
  }
}
638109
def camel_to_snake_case(string):
    
    s = _1.sub(r'\1_\2', string)
    return _2.sub(r'\1_\2', s).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;
}
1076152
public static String convertCase(Match.CaseConversion conversion, String s, String sample, Language lang) {
    if (StringTools.isEmpty(s)) {
      return s;
    }
    String token = s;
    switch (conversion) {
      case NONE:
        break;
      case PRESERVE:
        if (StringTools.startsWithUppercase(sample)) {
          if (StringTools.isAllUppercase(sample)) {
            token = token.toUpperCase(Locale.ENGLISH);
          } else {
            token = StringTools.uppercaseFirstChar(token, lang);
          }
        }
        break;
      case STARTLOWER:
        token = token.substring(0, 1).toLowerCase() + token.substring(1);
        break;
      case STARTUPPER:
        token = StringTools.uppercaseFirstChar(token, lang);
        break;
      case ALLUPPER:
        token = token.toUpperCase(Locale.ENGLISH);
        break;
      case ALLLOWER:
        token = token.toLowerCase();
        break;
      default:
        break;
    }
    return token;
  }
1106440
def camel_cased_to_dasherized(camel_cased_word)
      word = camel_cased_word.to_s.dup
      word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1-\2')
      word.gsub!(/([a-z\d])([A-Z])/,'\1-\2')
      word.downcase!
      word
    end
757309
function _camelcase(flag) {
  return flag.split('-').reduce(function (str, word) {
    return str + word[0].toUpperCase() + word.slice(1);
  });
}
1019848
function camelCase (str) {
  return ('' + str).replace(/(-[a-zA-Z])/g, function (text, u) {
    return u.substring(1).toLocaleUpperCase()
  })
}