Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Component/Render/MarkupTrait.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Component\Render; | 3 namespace Drupal\Component\Render; |
4 | |
5 use Drupal\Component\Utility\Unicode; | |
6 | 4 |
7 /** | 5 /** |
8 * Implements MarkupInterface and Countable for rendered objects. | 6 * Implements MarkupInterface and Countable for rendered objects. |
9 * | 7 * |
10 * @see \Drupal\Component\Render\MarkupInterface | 8 * @see \Drupal\Component\Render\MarkupInterface |
59 * | 57 * |
60 * @return int | 58 * @return int |
61 * The length of the string. | 59 * The length of the string. |
62 */ | 60 */ |
63 public function count() { | 61 public function count() { |
64 return Unicode::strlen($this->string); | 62 return mb_strlen($this->string); |
65 } | 63 } |
66 | 64 |
67 /** | 65 /** |
68 * Returns a representation of the object for use in JSON serialization. | 66 * Returns a representation of the object for use in JSON serialization. |
69 * | 67 * |