public static String trimToNull(String str) {
        String ts = trim(str);
        return isEmpty(ts) ? null : ts;
    }
<pre>
StringUtils.trimToNull(null)          = null
StringUtils.trimToNull("")            = null
StringUtils.trimToNull("     ")       = null
StringUtils.trimToNull("abc")         = "abc"
StringUtils.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
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/StringUtils.java