Create a URL/filesystem-friendly version of a string.
Via Maven
<dependency>
<groupId>pl.ksdev</groupId>
<artifactId>slugify</artifactId>
<version>0.3</version>
</dependency>
Via Gradle
compile 'pl.ksdev:slugify:0.3'
SlugService slugService = new SimpleSlugService();
String result = slugService.slugify("Zażółć gęślą jaźń"); // result = "zazolc-gesla-jazn"
SlugService slugService = new SimpleSlugService(5); // adds a max slug length (default = 200)
String result = slugService.slugify("1234567890"); // result = "12345"
The MIT License (MIT). Please see License File for more information.