Documentation

String


String

The string functions are particularly useful as template modifiers.


cut
Cut a string and add "..." at the end of it.

{$string|cut:10} // output Hello Worl...




cut_html
Cut an html string and add "..." at the end of it. It can remove html tags and images, and it mantain the html valid.

{$value.news|cut_html:30} // output New version of Rain Framewor...

 

rand_str( length )
Return a random string

rand_str( 5 ); // 9Ay6W random string