upper
将变量值转成大写字母。 等同于PHP的 strtoupper()
函数。
- <?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
.
原文: https://www.smarty.net/docs/zh_CN/language.modifier.upper.tpl