~ubuntu-branches/ubuntu/dapper/smarty/dapper-updates

« back to all changes in this revision

Viewing changes to libs/plugins/modifier.capitalize.php

  • Committer: Bazaar Package Importer
  • Author(s): Dimitri Fontaine
  • Date: 2004-04-16 17:41:20 UTC
  • Revision ID: james.westby@ubuntu.com-20040416174120-qb9ma0g419hkd25g
Tags: 2.6.2-2
* Adapted dependencies to allow running smarty with apache 2 (Closes: #241147)
* Prepared the template for i18n (Closes: #233098)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Smarty plugin
 
4
 * @package Smarty
 
5
 * @subpackage plugins
 
6
 */
 
7
 
 
8
 
 
9
/**
 
10
 * Smarty capitalize modifier plugin
 
11
 *
 
12
 * Type:     modifier<br>
 
13
 * Name:     capitalize<br>
 
14
 * Purpose:  capitalize words in the string
 
15
 * @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE
 
16
 *      capitalize (Smarty online manual)
 
17
 * @param string
 
18
 * @return string
 
19
 */
 
20
function smarty_modifier_capitalize($string)
 
21
{
 
22
    return ucwords($string);
 
23
}
 
24
 
 
25
?>