Skip to content

Commit

Permalink
fix: keep fixed length when truncating with str::limit (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanveen authored Mar 14, 2023
1 parent defa411 commit 0d9cd02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Support/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public static function limit($value, $limit = 100, $end = '...')
return $value;
}

return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')).$end;
return rtrim(mb_strimwidth($value, 0, $limit, $end, 'UTF-8'));
}

/**
Expand Down

0 comments on commit 0d9cd02

Please sign in to comment.