code: public static String abbreviate( String source, int maxLen )
      {
          if ( source == null || source.length() <= maxLen ) {
              return source;
          }
          return source.substring( 0, maxLen ) + "...";
      }
docs: Abbreviate a string if longer than maxLen.
  
  @param source may be null
  @param maxLen must be &gt;= 0. Up to this length, string is not truncated; otherwise truncated to maxLen and
  three dots as allipsis are added.
  @return original or truncated string (up tomaxLen+3 characters).