object
Slugify
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
val
ASCII: String
-
def
apply(s: String): String
-
def
as(algo: String): Slugify
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
lazy val
default: Slugify
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
def
normalize(algo: String): (String) ⇒ String
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
This makes pretty slugs out of any string in any charset.
There is an alternate implementation at https://github.com/slugify/slugify , but - it has GNU license - it just passes cyrillic letters along!
Most reasonable seems to use Transliterator from ICU4J library with custom mappings. This is very likely quite slow: needs benchmarking.
Credits: http://stackoverflow.com/questions/10188575/convert-latin-characters-to-normal-text-in-java http://stackoverflow.com/questions/1657193/java-code-library-for-generating-slugs-for-use-in-pretty-urls