public static String trimWhitespaceToNull ( final String s ) { final String result = trimWhitespace ( s ) ; return StringUtils . isEmpty ( result ) ? null : s ; }
Strip leading and trailing whitespace from a String . If the resulting string is empty this method returns null .