code: public static String toPrettyPrintedString(final TabularResult result) {
      ArgumentChecker.notNull(result, "result");
      StringBuilder sb = new StringBuilder();
      int[] maxWidths = maximumWidths(result);
      separator(sb, maxWidths);
      header(sb, maxWidths, result.getHeaderDefinition());
      separator(sb, maxWidths);
      for (final Row row : result) {
        row(sb, maxWidths, row);
      }
      separator(sb, maxWidths);
      return sb.toString();
    }
docs: Pretty print a TabularResult in a text-based table format.
  
  @param result a TabularResult, not null
  @return a String containing the table to be printed, not null.