comparison core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
2 2
3 namespace Drupal\Core\StringTranslation; 3 namespace Drupal\Core\StringTranslation;
4 4
5 use Drupal\Component\Render\FormattableMarkup; 5 use Drupal\Component\Render\FormattableMarkup;
6 use Drupal\Component\Utility\ToStringTrait; 6 use Drupal\Component\Utility\ToStringTrait;
7 use Drupal\Component\Utility\Unicode;
8 7
9 /** 8 /**
10 * Provides translatable markup class. 9 * Provides translatable markup class.
11 * 10 *
12 * This object, when cast to a string, will return the formatted, translated 11 * This object, when cast to a string, will return the formatted, translated
224 * 223 *
225 * @return int 224 * @return int
226 * The length of the string. 225 * The length of the string.
227 */ 226 */
228 public function count() { 227 public function count() {
229 return Unicode::strlen($this->render()); 228 return mb_strlen($this->render());
230 } 229 }
231 230
232 } 231 }