vm截取字符窜

#set($title = $xpath.getNode($item,”/rss/channel/item/title”).getText())

#set($titleShort = $title)

#if($titleShort.length()>20)

#set($titleShort = $titleShort.substr(0,20)+”…”)

#end

 
<a title=”$title”>$titleShort</a> 

 vm 中函数为 java 规范

你可能感兴趣的:(字符)