Package org.craftercms.core.util
Class UrlUtils
java.lang.Object
org.craftercms.core.util.UrlUtils
- Author:
- Sumer Jabri
-
Field Summary
Modifier and TypeFieldDescriptionstatic final char
static final char
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getShortName
(String longName, String containsShortNameRegex, int shortNameRegexGroup) Returns the short name representation of a long name.
-
Field Details
-
URL_PARAM_DELIM
public static final char URL_PARAM_DELIM- See Also:
-
URL_PARAM_SEPARATOR
public static final char URL_PARAM_SEPARATOR- See Also:
-
-
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:
-