diff --git a/core/lib/Drupal/Component/Diff/DiffEngine.php b/core/lib/Drupal/Component/Diff/DiffEngine.php
index 0d1ec5c..5be8a9d 100644
--- a/core/lib/Drupal/Component/Diff/DiffEngine.php
+++ b/core/lib/Drupal/Component/Diff/DiffEngine.php
@@ -8,6 +8,9 @@
  * You may copy this code freely under the conditions of the GPL.
  */
 
+use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\Unicode;
+
 define('USE_ASSERTS', FALSE);
 
 /**
@@ -238,7 +241,7 @@ function diff($from_lines, $to_lines) {
    * Returns the whole line if it's small enough, or the MD5 hash otherwise.
    */
   function _line_hash($line) {
-    if (drupal_strlen($line) > $this->MAX_XREF_LENGTH()) {
+    if (Unicode::strlen($line) > $this->MAX_XREF_LENGTH()) {
       return md5($line);
     }
     else {
@@ -993,7 +996,7 @@ function addWords($words, $tag = '') {
       }
       if ($word[0] == "\n") {
         $this->_flushLine($tag);
-        $word = drupal_substr($word, 1);
+        $word = Unicode::substr($word, 1);
       }
       assert(!strstr($word, "\n"));
       $this->_group .= $word;
@@ -1037,7 +1040,7 @@ function _split($lines) {
         $words[] = "\n";
         $stripped[] = "\n";
       }
-      if ( drupal_strlen( $line ) > $this->MAX_LINE_LENGTH() ) {
+      if ( Unicode::strlen( $line ) > $this->MAX_LINE_LENGTH() ) {
         $words[] = $line;
         $stripped[] = $line;
       }
@@ -1256,7 +1259,7 @@ function render() {
           break;
         case 'delete':
           foreach ($chunk->orig as $i => $piece) {
-            if (strpos($piece, '<') === 0 && drupal_substr($piece, drupal_strlen($piece) - 1) === '>') {
+            if (strpos($piece, '<') === 0 && Unicode::substr($piece, Unicode::strlen($piece) - 1) === '>') {
               $output .= $piece;
             }
             else {
@@ -1272,7 +1275,7 @@ function render() {
         default:
           $chunk->closing = $this->process_chunk($chunk->closing);
           foreach ($chunk->closing as $i => $piece) {
-            if ($piece === ' ' || (strpos($piece, '<') === 0 && drupal_substr($piece, drupal_strlen($piece) - 1) === '>' && drupal_strtolower(drupal_substr($piece, 1, 3)) != 'img')) {
+            if ($piece === ' ' || (strpos($piece, '<') === 0 && Unicode::substr($piece, Unicode::strlen($piece) - 1) === '>' && Unicode::strtolower(Unicode::substr($piece, 1, 3)) != 'img')) {
               $output .= $piece;
             }
             else {
@@ -1301,11 +1304,11 @@ function process_chunk($chunk) {
       if (!isset($processed[$j])) {
         $processed[$j] = '';
       }
-      if (strpos($piece, '<') === 0 && drupal_substr($piece, drupal_strlen($piece) - 1) === '>') {
+      if (strpos($piece, '<') === 0 && Unicode::substr($piece, Unicode::strlen($piece) - 1) === '>') {
         $processed[$j] = $piece;
         $j++;
       }
-      elseif (isset($next) && strpos($next, '<') === 0 && drupal_substr($next, drupal_strlen($next) - 1) === '>') {
+      elseif (isset($next) && strpos($next, '<') === 0 && Unicode::substr($next, Unicode::strlen($next) - 1) === '>') {
         $processed[$j] .= $piece;
         $j++;
       }
