thymeleaf if string not empty code example
Example 1: thymeleaf is string empty
<p th:text="${#strings.isEmpty(string)}"></p>
<p th:text="${#strings.isEmpty(nullString)}"></p>
<p th:text="${#strings.defaultString(emptyString,'Empty String')}"></p>
Example 2: thymeleaf if string empty
<div th:if= "${searchResults.results != ''}">