Camel format string

@param str
@param isFirstCapitalized
@return String in camelFormat
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();
	}
43266
static public String createCamelCapVersionOfKeyword(final String _keyword)
    {
        if (_keyword == null || _keyword.trim().length() == 0)
            return null;

        final StringBuilder sb = new StringBuilder();
        if (Character.isLowerCase(_keyword.charAt(0)))
            sb.append(Character.toUpperCase(_keyword.charAt(0)));
        final Matcher matcher = CAMELCAPS.matcher(_keyword);
        while (matcher.find())
            sb.append(matcher.group());
        return sb.toString();
    }
320457
protected StringBuffer mogrifyChat (
        StringBuffer buf, boolean transformsAllowed, boolean capFirst)
    {
        if (_mogrifyChat) {
            // do the generic mogrifications and translations
            buf = translatedReplacements("x.mogrifies", buf);

            // perform themed expansions and transformations
            if (transformsAllowed) {
                buf = translatedReplacements("x.transforms", buf);
            }
        }

        /*
        // capitalize the first letter
        if (capFirst) {
            buf.setCharAt(0, Character.toUpperCase(buf.charAt(0)));
        }
        // and capitalize any letters after a sentence-ending punctuation
        Pattern p = Pattern.compile("([^\\.][\\.\\?\\!](\\s)+\\p{Ll})");
        Matcher m = p.matcher(buf);
        if (m.find()) {
            buf = new StringBuilder();
            m.appendReplacement(buf, m.group().toUpperCase());
            while (m.find()) {
                m.appendReplacement(buf, m.group().toUpperCase());
            }
            m.appendTail(buf);
        }
        */

        return buf;
    }
85696
public function strDash($str, $camelFirst = true)
    {
        if ($camelFirst) {
            $str = StrUtil::camel($str);
        }
        return StrUtil::dash($str);
    }
1085066
protected static function camelizeOldVersion($input, $separator = '_', $capitalizeFirstCharacter = false) {
		$result = implode('', array_map(function ($key) {
			return ucfirst($key);
		}, explode($separator, $input)));
		
		if(!$capitalizeFirstCharacter) {
			$result = lcfirst($result);
		}
		return $result;
	}
1018078
public static StringBuilder camelCase(final StringBuilder target, boolean firstToLower, final String... tokens) {
        for (String t: tokens) {
            if (firstToLower) {
                firstToLower = false;
                target.append(t.toLowerCase());
            } else {
                appendFirstToUpper(target, t);
            }
        }
        return target;
    }
806703
private static String caseFormatWithDelimiter(String str, String delimiter, boolean isAllUpper, boolean isAllLower) {
		StringBuilder builder = new StringBuilder(str.length());
		String[] tokens = NOT_ALPHANUMERIC_REGEX.split(str);
		boolean shouldAddDelimiter = StringUtils.isNotEmpty(delimiter);
		for (int i = 0; i < tokens.length; i++) {
			String currentToken = tokens[i];
			builder.append(currentToken);
			boolean hasNextToken = i + 1 != tokens.length;
			if (hasNextToken && shouldAddDelimiter) {
				builder.append(delimiter);
			}
		}
		String outputString = builder.toString();
		if (isAllLower) {
			return StringUtils.lowerCase(outputString);
		} else if (isAllUpper) {
			return StringUtils.upperCase(outputString);
		}
		return outputString;
	}
192110
function ucfirst(input) {
  return isString(input) ? input.split(' ')
    .map(function (char) {
      return char.charAt(0).toUpperCase() + char.substring(1);
    }).join(' ') : input;
}
190558
public static function camelize(string $input, string $separator = '_', bool $capitalizeFirstCharacter = false): string {
    $output = $input;

    if (ctype_upper($output)) {
      $output = mb_strtolower($output);
    }

    if (strpos($output, $separator) || strpos($output, ' ')) {
      $output = mb_strtolower($input);
      $output = str_replace(' ', '', ucwords(str_replace($separator, ' ', $output)));
    }

    if ($output[0] && !$capitalizeFirstCharacter) {
      $output[0] = mb_strtolower($output[0]);
    }

    return $output;
  }
404039
function camelToUnderscore(str) {
            return s.split(/(?=[A-Z])/).map(function (p) {
                return p.charAt(0).toUpperCase() + p.slice(1);
            }).join('_');
        }
587743
def camelize(term, uppercase_first_letter = true)
      string = term.to_s
      string = if uppercase_first_letter
        string.sub(/^[a-z\d]*/, &:capitalize)
      else
        string.sub(/^((?=\b|[A-Z_])|\w)/, &:downcase)
               end
      string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{Regexp.last_match(1)}#{Regexp.last_match(2).capitalize}" }
      string.gsub!('/'.freeze, '::'.freeze)
      string
    end
343134
public static String lowerCaseFirstChar(String _str) {
        if (_str == null) {
            return null;
        }
        if (_str.isEmpty()) {
            return _str;
        }

        return _str.substring(0, 1).toLowerCase() + _str.substring(1);
    }
1270262
public static String toFirstUpper(String string) {
		int c = ((int) string.charAt(0));
		if (c >= 97 && c <=122) {
			// is lower
			char Upp = (char) (((int) string.charAt(0)) - 32);
			return Upp + string.substring(1);
		}
		return string;
	}
1033236
public static String toInitialCaps(String inString) {
    String lowerString = inString.toLowerCase();
    String outString = "";
    String alphaChars = "abcdefghijklmnopqrstuvwxyz";
    boolean doUpper = true;
    for (int i = 0; i < lowerString.length(); i++) {
      if (doUpper)
        outString += ("" + lowerString.charAt(i)).toUpperCase();
      else
        outString += lowerString.charAt(i);
      if (alphaChars.indexOf(lowerString.charAt(i)) >= 0)
        doUpper = false;
      if (lowerString.charAt(i) == ' ')
        doUpper = true;
    }
    return outString;
  }
548113
static String capitalizeFirstLetterOfString(String text, Locale locale) {
        if (text == null || text.length() < 1) {
            return text;
        }
        String textCapitalized = text.substring(0, 1).toUpperCase(locale) + text.substring(1);
        return textCapitalized;
    }
1120309
function ucFirst(value) {
    value = lodash.toString(value || '');
    return value.slice(0, 1).toUpperCase() + value.slice(1).toLowerCase();
}
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;
    }