struts2标签substring用法

<s:iterator value="#request.orderList" id="order" status="st">
<s:property value="#st.count" />
<s:set name="str" value="#order.room.description"></s:set>
<s:if test="#str.length()>10">
<s:property value="#str.substring(0,10)+'...'" />
</s:if>
<s:else>
<s:property value="#order.room.description" />
</s:else>
</s:iterator>
 

你可能感兴趣的:(substring)