转至:http://fengzhijie1103.iteye.com/blog/1142918

 

 freemarker截取字符串其实和JAVA语法是差不多了,也有substring 方法
    
   如代码:<#assign content=root.keyWord>
     ${content?substring(0,100)}... 这种方法是很常见,对吧
   
   但是freemarker还有一种和substring差不多.这种方法就很好

 

    ${root.keyWord[0..100]}... 结果和subString 一样的
   
    但是用法却简单

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
相关资源
相似解决方案