code: public static String shrinkSpace(Object o) {
          if (null == o) return "";
          return o.toString().replaceAll("[\r\n]+", "\n").replaceAll("[ \\t\\x0B\\f]+", " ");
      }
docs: Shrink spaces in an object's string representation by merge multiple
  spaces, tabs into one space, and multiple line breaks into one line break
  
  @param o
  @return the string result