All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.chilldev.commons.text.slugifier.Slugifier Maven / Gradle / Ivy

There is a newer version: 0.4.4
Show newest version
/*
 * This file is part of the ChillDev-Commons.
 *
 * @license http://mit-license.org/ The MIT license
 * @copyright 2015 - 2016 © by Rafał Wrzeszcz - Wrzasq.pl.
 */

package pl.chilldev.commons.text.slugifier;

/**
 * Interface for URL slug generators.
 */
@FunctionalInterface
public interface Slugifier
{
    /**
     * Generates URL slug for given text.
     *
     * @param text Plain text value.
     * @return URL-friendly slug.
     */
    default String slugify(String text)
    {
        return this.slugify(new String[] {text});
    }

    /**
     * Generates URL slug for given set of text.
     *
     * @param texts Plain text values.
     * @return URL-friendly slug.
     */
    String slugify(String... texts);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy