We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5eebc54 commit 74c836dCopy full SHA for 74c836d
src/Util.php
@@ -325,12 +325,12 @@ public static function is_cli() {
325
* @param string $text input
326
* @return string output
327
*/
328
- public static function slugify($text, $lowercase = true, $skip_chars = '') {
+ public static function slugify($text, $lowercase = true, $skip_chars = '', $replace = '-') {
329
330
// replace non letter or digits by -
331
- $text = preg_replace('~[^\\pL\d'.$skip_chars.']+~u', '-', $text);
+ $text = preg_replace('~[^\\pL\d'.$skip_chars.']+~u', $replace, $text);
332
// trim
333
- $text = trim($text, '-');
+ $text = trim($text, $replace);
334
// transliterate
335
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
336
// lowercase
0 commit comments