Skip to content

Commit 75855ff

Browse files
authored
[String] Remove confusing paragraph about withEmoji('strip')
The AsciiSlugger does remove every emoji from a given string per default without any external component or package, as they are not... ASCII. The paragraph added some confusion to the reader, implying that * AsciiSlugger did not work with emoji per default * the special locale + the Intl component was required So i suggest to purely remove it.
1 parent ba94e0b commit 75855ff

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

components/string.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -589,16 +589,6 @@ from GitHub or Slack, use the first argument of ``withEmoji()`` method::
589589
$slug = $slugger->slug('a 😺, 🐈‍⬛, and a 🦁');
590590
// $slug = 'a-smiley-cat-black-cat-and-a-lion';
591591

592-
If you want to strip emojis from slugs, use the special ``strip`` locale::
593-
594-
use Symfony\Component\String\Slugger\AsciiSlugger;
595-
596-
$slugger = new AsciiSlugger();
597-
$slugger = $slugger->withEmoji('strip');
598-
599-
$slug = $slugger->slug('a 😺, 🐈‍⬛, and a 🦁');
600-
// $slug = 'a-and-a';
601-
602592
.. _string-inflector:
603593

604594
Inflector

0 commit comments

Comments
 (0)