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

ru.fix.aggregating.profiler.engine.NameNormalizer Maven / Gradle / Ivy

There is a newer version: 1.6.6
Show newest version
package ru.fix.aggregating.profiler.engine;

public class NameNormalizer {

    public static String trimDots(String s) {
        if (s == null) {
            throw new NullPointerException("Given null instead of string");
        }
        s = s.trim();

        if (s.startsWith(".")) {
            s = s.substring(1);
        }

        if (s.endsWith(".")) {
            s = s.substring(0, s.length() - 1);
        }

        return s;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy