Class UrlUtils

java.lang.Object
org.craftercms.core.util.UrlUtils

public class UrlUtils extends Object
Author:
Sumer Jabri
  • Field Details

  • Constructor Details

    • UrlUtils

      public UrlUtils()
  • Method Details

    • 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: