You are here

public function SafeStringTrait::count in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Component/Utility/SafeStringTrait.php \Drupal\Component\Utility\SafeStringTrait::count()

Returns the string length.

Return value

int The length of the string.

File

lib/Drupal/Component/Utility/SafeStringTrait.php, line 66
Contains \Drupal\Component\Utility\SafeStringTrait.

Class

SafeStringTrait
Implements SafeStringInterface and Countable for rendered objects.

Namespace

Drupal\Component\Utility

Code

public function count() {
  return Unicode::strlen($this->string);
}