function drupal_strlen


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 drupal_strlen($text)
cle7 drupal_strlen($text)
elmsmedia7 drupal_strlen($text)
icor7 drupal_strlen($text)
meedjum_blog7 drupal_strlen($text)
mooc7 drupal_strlen($text)

Counts the number of characters in a UTF-8 string.

This is less than or equal to the byte count.


$text: The string to run the operation on.

Return value

integer The length of the string.

Related topics

56 calls to drupal_strlen()
ctools_cleanstring_truncate in sites/all/modules/ulmus/ctools/includes/
A friendly version of truncate_utf8.
ctools_string_length_ctools_access_check in sites/all/modules/ulmus/ctools/plugins/access/
Check for access.
devel_variable_form in sites/all/modules/ulmus/devel/
DrupalDiffInline::process_chunk in sites/all/modules/ulmus/diff/DiffEngine.php
Merge chunk segments between tag delimiters.
DrupalDiffInline::render in sites/all/modules/ulmus/diff/DiffEngine.php
Render differences inline using HTML markup.

... See full list


includes/, line 475
Provides Unicode-related conversions and operations.


function drupal_strlen($text) {
  global $multibyte;
  if ($multibyte == UNICODE_MULTIBYTE) {
    return mb_strlen($text);
  else {
    // Do not count UTF-8 continuation bytes.
    return strlen(preg_replace("/[\x80-\xBF]/", '', $text));