upper
用来将一个变量的内容全部大写。等于PHP的strtoupper()函数。
例子5-22. 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. |
|
参见lower和capitalize。