public static String slugify ( final String value ) { validate ( value , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; String transliterated = transliterate ( collapseWhitespace ( value . trim ( ) . toLowerCase ( ) ) ) ; return Arrays . stream ( words ( transliterated . replace ( "&" , "-and-" ) , "\\W+" ) ) . collect ( joining ( "-" ) ) ; }
Convert a String to a slug