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

Breadcrumb

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

function MarkupTrait::count

Returns the string length.

Return value

int The length of the string.

File

core/lib/Drupal/Component/Render/MarkupTrait.php, line 61

Class

MarkupTrait
Implements MarkupInterface and Countable for rendered objects.

Namespace

Drupal\Component\Render

Code

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

API Navigation

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