/[cvs]/nfo/php/libs/net.php.smarty/plugins/modifier.count_characters.php
ViewVC logotype

Annotation of /nfo/php/libs/net.php.smarty/plugins/modifier.count_characters.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Wed Oct 9 00:53:36 2002 UTC (21 years, 10 months ago) by cvsjoko
Branch: MAIN
no message

1 cvsjoko 1.1 <?php
2    
3     /*
4     * Smarty plugin
5     * -------------------------------------------------------------
6     * Type: modifier
7     * Name: count_characteres
8     * Purpose: count the number of characters in a text
9     * -------------------------------------------------------------
10     */
11     function smarty_modifier_count_characters($string, $include_spaces = false)
12     {
13     if ($include_spaces)
14     return(strlen($string));
15    
16     return preg_match_all("/[^\s]/",$string, $match);
17     }
18    
19     /* vim: set expandtab: */
20    
21     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed