Class UrlUtils


  • public class UrlUtils
    extends Object
    Author:
    Sumer Jabri
    • Constructor Detail

      • UrlUtils

        public UrlUtils()
    • Method Detail

      • getShortName

        public static String getShortName​(String longName,
                                          String containsShortNameRegex,
                                          int shortNameRegexGroup)
        Returns the short name representation of a long name.
        Parameters:
        longName -
        containsShortNameRegex - the regex that identifies whether the long name contains a short name. This regex should also contain a group expression that can be use to capture for the short name (see the Pattern class javadoc).
        shortNameRegexGroup - the index of the captured group that represents the short name (see the Pattern class javadoc)
        Returns:
        the short name, or the long name if there was no short name match
        See Also:
        Pattern