public static String trimInner(String value) {

		if (isNullOrEmpty(value)) {
			return value;
		}

		value = value.trim();
		return value.replaceAll("\\s+", "");
	}
public static String trimInner(String value) {

		if (isNullOrEmpty(value)) {
			return value;
		}

		value = value.trim();
		return value.replaceAll("\\s+", "");
	}
public static String trimInner ( String value ) { if ( isNullOrEmpty ( value ) ) { return value ; } value = value . trim ( ) ; return value . replaceAll ( "\\s+" , "" ) ; }
Additionally to outer <code>trim()</code> all inner spaces are removed.

@param value to remove inner spaces from
@return value with single spaces if any
Additionally to outer <code > trim () < / code > all inner spaces are removed .