如何将字符串转换为freemarker中的数组
我遇到了一个问题:
如果用户给出a = abhay,Himanshu,aman,piyush
的值 他们没有像这样提到a = [“ Abhay”,“ Himanshu”,“ Aman”,“ Piyush”]
。
因此
<#list a as x>
${x}
</#list>
I have got stuck in one problem:
If the user give the value of a = abhay, himanshu, aman, piyush
they have not mentioned like this a = ["abhay","himanshu","aman","piyush"]
.
So how should I use this a
as an array in this:
<#list a as x>
${x}
</#list>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用String indendin
?split
通过正则表达式拆分字符串:另请参阅:
You can use the string builtin
?split
to split a string by a regular expression:See also: