public static String abbreviate(final String str, final int maxWidth) {
        return maxWidth <= 0 ? str : StringUtils.abbreviate(str, maxWidth);
    }
Abbreviate string.

@param str      the str
@param maxWidth the max width; negative/zero values disable abbreviation
@return the string
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java