code: 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;
  	}
docs: Change case using delimiter between words
  
  @param str
  @param delimiter
  @param isAllUpper
  @param isAllLower
  @return string after change case