Hi there,
i'm evaluating Velocity to find out whether it meets my requirements to
generate text by using custom templates. I looked at the user guide and
wrote a little hello world application but there are requirements for which
I don't know if I have to write my own methods or if there are velocity
tools that would do the job for me:

Is there a way to automatically add line breaks when you merge the template
with the context (without cutting words after e.g. 80 characters)?

Is there a way to use text shifting (indentation) in combination with line
breaks without cutting words after e.g. 80 characters)?
Long text: $magic.doMagic( $text )
-->
Long text: Some very 
        Very long text, 
        more text …   
   
Is there a way to automatically add line breaks (without cutting words after
e.g. 80 characters) and add a certain String (e.g. "100. ") at the beginning
of each line:
Funny Velocity user request: $magic.doMagic2( $text )
-->
Funny Velocity user request: this
100. is just a test, a test, a test, a
100. test, a test …

Is there a way to cut the string of a variable after 9 characters and add a
"*" to the string, if the string has more than 10 characters?
#set( $test = "textwithmorethan10char" )
Test: $magic.doMagic3( $test)
-->
Test: textwithm*
Thanx in advance!

-- 
View this message in context: 
http://old.nabble.com/Does-velocity-provide-these-features--tp31748723p31748723.html
Sent from the Velocity - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org

Reply via email to