diff --git a/core/lib/Drupal/Component/Utility/Unicode.php b/core/lib/Drupal/Component/Utility/Unicode.php index 6bbece6..3ae7b35 100644 --- a/core/lib/Drupal/Component/Utility/Unicode.php +++ b/core/lib/Drupal/Component/Utility/Unicode.php @@ -123,7 +123,7 @@ public static function getStatus() { * @param int $status * The new status of multibyte support. * - * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. In Drupal + * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. In Drupal * 9 there will be no way to set the status and in Drupal 8 this ability has * been removed. */ @@ -264,6 +264,9 @@ public static function truncateBytes($string, $len) { * * @return int * The length of the string. + * + * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. Use + * mb_strlen() instead. */ public static function strlen($text) { return mb_strlen($text); @@ -277,6 +280,9 @@ public static function strlen($text) { * * @return string * The string in uppercase. + * + * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. Use + * mb_strtoupper() instead. */ public static function strtoupper($text) { return mb_strtoupper($text); @@ -290,6 +296,9 @@ public static function strtoupper($text) { * * @return string * The string in lowercase. + * + * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. Use + * mb_strtolower() instead. */ public static function strtolower($text) { return mb_strtolower($text); @@ -358,9 +367,12 @@ public static function ucwords($text) { * * @return string * The shortened string. + * + * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. Use + * mb_substr() instead. */ public static function substr($text, $start, $length = NULL) { - return $length === NULL ? mb_substr($text, $start) : mb_substr($text, $start, $length); + return mb_substr($text, $start, $length); } /** @@ -585,6 +597,9 @@ public static function validateUtf8($text) { * The position where $needle occurs in $haystack, always relative to the * beginning (independent of $offset), or FALSE if not found. Note that * a return value of 0 is not the same as FALSE. + * + * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. Use + * mb_strpos() instead. */ public static function strpos($haystack, $needle, $offset = 0) { return mb_strpos($haystack, $needle, $offset);