code: public static String noSpaces(String str, String replaceWith) {
  		return StringUtils.isBlank(str) ? "" : str.trim().replaceAll("[\\p{C}\\p{Z}]+",
  				StringUtils.trimToEmpty(replaceWith)).toLowerCase();
  	}
docs: Converts spaces to dashes.
  @param str a string with spaces
  @param replaceWith a string to replace spaces with
  @return a string with dashes