upper

将变量值转成大写字母。 等同于PHP的 strtoupper()函数。

Example 5.23. upper


<?php
$smarty->assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While.");
?>

   

模板:


{$articleTitle}
{$articleTitle|upper}

   

输出:


If Strike isn't Settled Quickly it may Last a While.
IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE.

   

参见 lowercapitalize.