I want to use the little function left:

string left( string zeichen, int anzahl ){   
   if( anzahl<zeichen.length ){
      return zeichen[0..(anzahl-1)];
   }  
   return zeichen;
 }



Inside a Diet template. But after calling

res.render!("template.dt",string_var,..,left)

I was only able to use:

left(string_var,20)

not

string_var.left(20)

which was possible inside main?

Why?
Sorry for the bad posts. Please delete...