string_length

Versions
4.6
string_length(&$text)

Count the amount of characters in a UTF-8 string. This is less than or equal to the byte count.

Related topics

▾ 2 functions call string_length()

do_search in modules/search.module
Do a query on the full-text search index for a word or words.
search_index in modules/search.module
Update the full-text search index for a particular item.

Code

includes/common.inc, line 1854

<?php
function string_length(&$text) {
  return strlen(preg_replace("/[\x80-\xBF]/", '', $text));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.