Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TranslatableMarkup.php

function 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\StringTranslation

Code

public function count() : int {
    return mb_strlen($this->render());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal