Smarty:upper

2018-10-12 15:53 更新

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.

参见 lower 和 capitalize.

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号