package net.apunch.blacksmith.util;

public final class Sanitizer {

    private Sanitizer() {

    }

    /**
     * Sanitizes an item name to the format used by this plugin
     *
     * @param itemName <p>The item name to sanitize</p>
     * @return <p>The sanitized name</p>
     */
    public static String sanitizeItemName(String itemName) {
        return itemName.toLowerCase().replace('_', '-');
    }

    /**
     * Converts a sanitized item name to the original name
     *
     * @param itemName <p>The item name to convert</p>
     * @return <p>The un-sanitized name</p>
     */
    public static String sanitizedToItemName(String itemName) {
        return itemName.toUpperCase().replace('-', '_');
    }

}
