function drupal_strlen

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

Parameters

$text: The string to run the operation on.

Return value

integer The length of the string.

See also

\Drupal\Component\Utility\Unicode::strlen().

Related topics

28 calls to drupal_strlen()
AccountFormController::validate in drupal/core/modules/user/lib/Drupal/user/AccountFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
DrupalDiffInline::process_chunk in drupal/core/lib/Drupal/Component/Diff/DiffEngine.php
Merge chunk segments between tag delimiters.
DrupalDiffInline::render in drupal/core/lib/Drupal/Component/Diff/DiffEngine.php
Render differences inline using HTML markup.
drupal_html_to_text in drupal/core/includes/mail.inc
Transforms an HTML string into plain text, preserving its structure.
Field::saveNew in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
Saves a new field definition.

... See full list

2 string references to 'drupal_strlen'
ItemList::getString in drupal/core/lib/Drupal/Core/TypedData/ItemList.php
Overrides \Drupal\Core\TypedData\TypedData::getString().
Map::getString in drupal/core/lib/Drupal/Core/TypedData/Type/Map.php
Overrides \Drupal\Core\TypedData\TypedData::getString().

File

drupal/core/includes/unicode.inc, line 256
Provides Unicode-related conversions and operations.

Code

function drupal_strlen($text) {
  return Unicode::strlen($text);
}