function TranslatableMarkup::count
Same name in other branches
- 8.9.x core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php \Drupal\Core\StringTranslation\TranslatableMarkup::count()
- 10 core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php \Drupal\Core\StringTranslation\TranslatableMarkup::count()
- 11.x core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php \Drupal\Core\StringTranslation\TranslatableMarkup::count()
Returns the string length.
Return value
int The length of the string.
Overrides FormattableMarkup::count
File
-
core/
lib/ Drupal/ Core/ StringTranslation/ TranslatableMarkup.php, line 227
Class
- TranslatableMarkup
- Provides translatable markup class.
Namespace
Drupal\Core\StringTranslationCode
public function count() {
return mb_strlen($this->render());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.