I want to abbreviate a string with Thymeleaf

后端 未结 1 761
刺人心
刺人心 2021-01-27 09:26

I have a table and I want to change a column, the column contains a string. For example: \"this is my string\" --> \"this is my...\". I try to do this whith abbreviate().

1条回答
  •  孤城傲影
    2021-01-27 10:09

    Your syntax needs to be corrected.

    The general case is: ${#strings.abbreviate(str,10)} so you would want:

    [this is my...]

    0 讨论(0)
提交回复
热议问题