title: How to extract the first letter from the string in Thymeleaf?
body: <p>How to extract the first letter from the string in Thymeleaf.</p>
  <pre><code>&lt;div th:text=&quot;${#strings.substring(person.someProperty, 0, 1)}&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>Can someone please tell the difference between them mentioned below as I can use both insides of the div. Which one should I use. What is the role of square bracket</p>
  <pre><code>th:text=&quot;${ps.name}&quot;
  
  [[${ps.name}]]
  </code></pre>