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/api.elmsln.org/includes/bootstrap.inc).
cis7 unicode.inc drupal_strlen($text)
cle7 unicode.inc drupal_strlen($text)
elmsmedia7 unicode.inc drupal_strlen($text)
icor7 unicode.inc drupal_strlen($text)
meedjum_blog7 unicode.inc drupal_strlen($text)
mooc7 unicode.inc drupal_strlen($text)

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

This is less than or equal to the byte count.

Parameters

$text: The string to run the operation on.

Return value

integer The length of the string.

Related topics

63 calls to drupal_strlen()
ctools_cleanstring_truncate in sites/all/modules/ulmus/ctools/includes/cleanstring.inc
A friendly version of truncate_utf8.
ctools_string_length_ctools_access_check in sites/all/modules/ulmus/ctools/plugins/access/string_length.inc
Check for access.
devel_variable_form in sites/all/modules/ulmus/devel/devel.pages.inc
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

File

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

Code

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));
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.