当前位置:网站首页>Processing string by thymeleaf

Processing string by thymeleaf

2020-11-10 17:25:24 Irving the procedural ape

 Is the judgment empty :null: <span th:if="${name} != null"> Not empty </span> <span th:if="${name1} == null"> It's empty </span>  Judge whether it is an empty string : “” <span th:if="${#strings.isEmpty(name1)}"> Empty </span>  Judge whether it is the same : <span th:if="${name} eq 'jack'"> Same as jack,</span> <span th:if="${name} eq 'ywj'"> Same as ywj,</span> <span th:if="${name} ne 'jack'"> Not the same as jack,</span>  There is no setting default value : <span th:text="${name2} ?: ' The default value is '"></span>  Does it include ( Case sensitive ): <span th:if="${#strings.contains(name,'ez')}"> package ez</span> <span th:if="${#strings.contains(name,'y')}"> package j</span>  Does it include ( Case insensitive ) <span th:if="${#strings.containsIgnoreCase(name,'y')}"> package j</sp.........

版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢