Got it. Merci beaucoup.
gmc
Nathan Bubna wrote:
On Fri, Sep 12, 2008 at 7:03 PM, sebb <[EMAIL PROTECTED]> wrote:
On 13/09/2008, Gary M. Catlin <[EMAIL PROTECTED]> wrote:
Hello All,
I have a simple task to split a string but not able to get it to work. I am
using the following line to split my input string.
#set ($Title = $test.TestTitle.split(" - ", 2))
I am having trouble directly accessing the two resultant elements in the
list. Both the following come back empty.
$Title.get(0)
$Title.get(1)
I *can* get to the data using a foreach loop, but it seems a little
roundabout.
#foreach ($val in $Title)
#if ($velocityCount == 1) #set ($Number = $val) #end
#if ($velocityCount == 2) #set ($Name = $val) #end
#end
Does someone know of a better way to access the information? Thank you.
http://wiki.apache.org/jakarta-velocity/ListTool
this was incorporated into VelocityTools:
http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/generic/ListTool.html
gmc
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]