code: public static boolean isTrimmed(String str) {
          int length;
          if (str == null || (length = str.length()) == 0) {
              return true;
          }
          return !Character.isWhitespace(str.charAt(0))
                  && !Character.isWhitespace(str.charAt(length - 1));
      }
docs: Checks if the given string is {@code null}, empty (""), or the first and last characters are
  not whitespace.
  
  <pre>
  Strings.isTrimmed(null)  == true
  Strings.isTrimmed("")    == true
  Strings.isTrimmed(" ")   == false
  Strings.isTrimmed("Hi")  == true
  Strings.isTrimmed("Hi ") == false
  Strings.isTrimmed(" Hi") == false
  </pre>
  
  @param str the string to check, may be {@code null}
  @return {@code true} if the string is {@code null}, empty, or the first and last characters
  are not whitespace.
  
  @since 1.3