/lib/jelix/plugins/tpl/common/modifier.sprintf.php
PHP | 25 lines | 5 code | 2 blank | 18 comment | 0 complexity | 11696b211b9eb695de6a68d2f58f2178 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, BSD-3-Clause, JSON, GPL-3.0, LGPL-3.0
- <?php
- /**
- * Plugin from smarty project and adapted for jtpl
- * @package jelix
- * @subpackage jtpl_plugin
- * @copyright 2001-2003 ispi of Lincoln, Inc.
- * @link http://smarty.php.net/
- * @link http://jelix.org/
- * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
- */
- /**
- * modifier plugin : format strings via sprintf
- *
- * <pre>{$mytext|sprintf:'my format %s'}</pre>
- * @param string $string
- * @param string $format
- * @return string
- * @see sprintf
- */
- function jtpl_modifier_common_sprintf($string, $format)
- {
- return sprintf($format, $string);
- }