[英]Using Velocity combined with Java, I'm trying to pull a single field from a '.' delimited string
I have my velocity directive set as #set ($stringList = $string.split(".")) 我将我的力度指令设置为#set($ stringList = $ string.split(“。”))
I have tried the following in my syntax but can't get it to work 我在语法中尝试了以下内容,但无法正常工作
$stringList.get(0)
$stringList[0]
$stringList.[0]
${stringList}.get(0)
change 更改
#set ($stringList = $string.split("."))
to 至
#set ($stringList = $string.split("\\."))
and access it like 并像访问
$stringList[0]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.