Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: utf8

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /phputf8/mbstring/strlen.php

Documentation is available at strlen.php

  1. <?php
  2. /**
  3. @version $Id: strlen.php,v 1.1 2006/02/26 22:13:17 harryf Exp $
  4. @package utf8
  5. @subpackage strings
  6. */
  7.  
  8. /**
  9. * Define UTF8_STRLEN as required
  10. */
  11. if !defined('UTF8_STRLEN') ) {
  12.     define('UTF8_STRLEN',TRUE);
  13. }
  14.  
  15. //--------------------------------------------------------------------
  16. /**
  17. * Wrapper round mb_strlen
  18. * Assumes you have mb_internal_encoding to UTF-8 already
  19. * Note: this function does not count bad bytes in the string - these
  20. * are simply ignored
  21. @param string UTF-8 string
  22. @return int number of UTF-8 characters in string
  23. @package utf8
  24. @subpackage strings
  25. */
  26. function utf8_strlen($str){
  27.     return mb_strlen($str);
  28. }

Documentation generated on Mon, 05 Mar 2007 21:27:18 +0000 by phpDocumentor 1.3.1