TranslatableMarkup::count

public 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 236

Class

TranslatableMarkup
Provides translatable markup class.

Namespace

Drupal\Core\StringTranslation

Code

public function count() {
  return Unicode::strlen($this->render());
}
doc_Drupal
2016-10-29 09:49:04
Comments
Leave a Comment

Please login to continue.