thymeleaf strings is 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 != ''}">
Example 3: thymeleaf strings is not empty
<div th:if= "${searchResults.results != null}">