Newer
Older
pmd-jenkins-library / vars / util.groovy
@Robin Gower Robin Gower on 17 Oct 2018 155 bytes Extract util.slugise()
String slugise(String string) {
  string.toLowerCase()
        .replaceAll('[^\\w/]', '-')
        .replaceAll('-+', '-')
        .replaceAll('-\$', '')
}