code: public static String trimDoubleSpaces(String value) {
  
  		if (isNullOrEmpty(value)) {
  			return value;
  		}
  
  		value = value.trim();
  		return value.replaceAll("\\s+", " ");
  	}
docs: Additionally to outer <code>trim()</code> double spaces are removed.
  
  @param value to remove double spaces from
  @return value with single spaces if any