Skip to content

Commit 220f4ac

Browse files
committed
use strtr
1 parent f21506e commit 220f4ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Illuminate/Support/Str.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,7 @@ public static function substrReplace($string, $replace, $offset = 0, $length = n
917917
*/
918918
public static function swap(array $map, $subject)
919919
{
920+
return strtr($subject, $map);
920921
return str_replace(array_keys($map), array_values($map), $subject);
921922
}
922923

0 commit comments

Comments
 (0)