/*
Convert CamelCasedString to dash-separated-string

@param    string   CamelCasedString
@return   string   dash-separated-string
776509
public static function convertCamelCaseToDash ($value)
    {
        $Filter = new \Zend\Filter\Word\CamelCaseToDash();
        return $Filter->filter($value);
    }
687600
public static function camelCase(string $string, array $noStrip = null, bool $lowerCaseFirstLetter = null)
    {
        // non-alpha and non-numeric characters become spaces
        $string = preg_replace('/[^a-z0-9' . implode('', $noStrip ?? []) . ']+/i', ' ', $string);
        $string = trim($string);
        $string = ucwords($string);
        $string = str_replace(' ', '', $string);

        if ($lowerCaseFirstLetter === null || $lowerCaseFirstLetter === true) {
            $string = lcfirst($string);
        }

        return $string;
    }
544644
public static function dashless(string $s)
	{
		$s = trim($s);
		$s = self::replace($s, '#\-#', '');

		return $s;
	}
1113533
def lower_camel_case_from_underscores(string):
    """"""
    components = string.split('_')
    string = components[0]
    for component in components[1:]:
        string += component[0].upper() + component[1:]
    return string
390551
function camelCase(str) {
            return str.replace(reMs, "ms-").replace(reSnakeCase, function (all, letter) {
                return letter.toUpperCase();
            });
        }
639137
public function hyphen_to_camel( $string, $upper_first = false ) {
		$str = preg_replace_callback( '/-(.)/u', function ( $match ) {
			return strtoupper( $match[1] );
		}, strtolower( $string ) );
		if ( $upper_first ) {
			$str = ucfirst( $str );
		}

		return $str;
	}
1321596
public static function camelCaseToUnderline($camelCaseStr, $separator = '_')
    {
        $temp_array = array();
        for ($i = 0; $i < strlen($camelCaseStr); $i++) {
            $ascii_code = ord($camelCaseStr[$i]);
            if ($ascii_code >= 65 && $ascii_code <= 90) {
                $temp_array[] = $separator . chr($ascii_code + 32);
            } else {
                $temp_array[] = $camelCaseStr[$i];
            }
        }
        return implode('', $temp_array);
    }
1060975
public static function toCamelCaseFormat($text, $separator = '-')
    {
        $slugified = self::urlize($text, $separator);
        $camel = strtolower($slugified);
        $camel = ucwords($camel, $separator);

        return str_replace($separator, '', $camel);
    }
1181991
function formatHeaderName(headerName) {
    var lowerCasedHeaderName = headerName.toLowerCase();
    if (headerNameSpecialCases.hasOwnProperty(lowerCasedHeaderName)) {
        return headerNameSpecialCases[lowerCasedHeaderName];
    } else {
        // Make sure that the first char and all chars following a dash are upper-case:
        return lowerCasedHeaderName.replace(/(^|-)([a-z])/g, function ($0, optionalLeadingDash, ch) {
            return optionalLeadingDash + ch.toUpperCase();
        });
    }
}
264017
function dashProperCase(str) {
        if ( !str.length ) {
            return str;
        }
        return str.split('-').map(function (piece) {
            if ( piece.length ) {
                return piece.substring(0, 1).toUpperCase() + piece.substring(1);
            }
            return piece;
        }).join('-');
    }
21790
function camelCase(str) {
    return str
        .replace(/[-_\s]+(.)/gu, (_, c) => c.toUpperCase())
        .replace(/^./u, c => c.toLowerCase())
}
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();
	}
30766
public static function camelize($string, $delimiter = ' '): string
    {
        $stringParts = explode($delimiter, $string);
        $camelized = array_map('ucwords', $stringParts);

        return implode($delimiter, $camelized);
    }
857901
function( string ){
      string = string.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();});
      // remove first dash
      return  ( string.charAt( 0 ) == '-' ) ? string.substr(1) : string;
    }
1059824
function camelCase (str) {
  return str
    .replace(/_/g, (_, index) => index === 0 ? _ : '-')
    .replace(/(?:^\w|[A-Z]|\b\w)/g, (letter, index) =>
      index === 0 ? letter.toLowerCase() : letter.toUpperCase()
    )
    .replace(invalidChars, '')
}
414467
function camelCase(str) {
  if (str.indexOf('-') > -1) {
    str = str.replace(/-\w/g, function (letter) {
      return letter.substr(1).toUpperCase();
    });
  }

  return str;
}
158866
function camelize(str) {
  return str.replace(/(?:^\w|[A-Z]|\b\w)/g, (letter, index) => {
    return index === 0 ? letter.toLowerCase() : letter.toUpperCase()
  }).replace(/[\s\-_]+/g, '')
}