@@ -56,10 +56,10 @@ public static function removeDotSegments($input)
5656 // buffer; otherwise,
5757 } elseif (StringUtil::startsWith ($ input , '/../ ' )) {
5858 $ input = substr ($ input , 3 );
59- $ output = substr_replace ($ output , '' , \mb_strrpos ($ output , '/ ' ));
59+ $ output = substr_replace ($ output , '' , StringUtil:: reversePosition ($ output , '/ ' ));
6060 } elseif ($ input === '/.. ' ) {
6161 $ input = '/ ' ;
62- $ output = substr_replace ($ output , '' , \mb_strrpos ($ output , '/ ' ));
62+ $ output = substr_replace ($ output , '' , StringUtil:: reversePosition ($ output , '/ ' ));
6363
6464 // D. if the input buffer consists only of "." or "..", then remove
6565 // that from the input buffer; otherwise,
@@ -70,7 +70,7 @@ public static function removeDotSegments($input)
7070 // the output buffer, including the initial "/" character (if
7171 // any) and any subsequent characters up to, but not including,
7272 // the next "/" character or the end of the input buffer.
73- } elseif (!(($ pos = \mb_strpos ($ input , '/ ' , 1 )) === false )) {
73+ } elseif (!(($ pos = StringUtil:: position ($ input , '/ ' , 1 )) === false )) {
7474 $ output .= substr ($ input , 0 , $ pos );
7575 $ input = substr_replace ($ input , '' , 0 , $ pos );
7676 } else {
@@ -131,7 +131,7 @@ private function absolutizeUrl()
131131 if (StringUtil::startsWith ($ r ['path ' ], '/ ' )) {
132132 $ target ['path ' ] = self ::removeDotSegments ($ r ['path ' ]);
133133 } else {
134- $ base = \mb_strrchr ($ b ['path ' ], '/ ' , true );
134+ $ base = StringUtil:: characterReversePosition ($ b ['path ' ], '/ ' , true );
135135 if ($ base === false ) {
136136 $ base = '' ;
137137 }
0 commit comments