code: public static String trimToNull(String str) {
          str = trim(str);
  
          return N.isNullOrEmpty(str) ? null : str;
      }
docs: <p>
  Removes control characters (char &lt;= 32) from both ends of this String
  returning {@code null} if the String is empty ("") after the trim or if
  it is {@code null}.
  
  <p>
  The String is trimmed using {@link String#trim()}. Trim removes start and
  end characters &lt;= 32. To strip whitespace use
  {@link #stripToNull(String)}.
  </p>
  
  <pre>
  N.trimToNull(null)          = null
  N.trimToNull("")            = null
  N.trimToNull("     ")       = null
  N.trimToNull("abc")         = "abc"
  N.trimToNull("    abc    ") = "abc"
  </pre>
  
  @param str
  the String to be trimmed, may be null
  @return the trimmed String, {@code null} if only chars &lt;= 32, empty or
  null String input
  @since 2.0