Package org.craftercms.core.util
Class UrlUtils
- java.lang.Object
-
- org.craftercms.core.util.UrlUtils
-
public class UrlUtils extends Object
- Author:
- Sumer Jabri
-
-
Field Summary
Fields Modifier and Type Field Description static charURL_PARAM_DELIMstatic charURL_PARAM_SEPARATOR
-
Constructor Summary
Constructors Constructor Description UrlUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetShortName(String longName, String containsShortNameRegex, int shortNameRegexGroup)Returns the short name representation of a long name.
-
-
-
Field Detail
-
URL_PARAM_DELIM
public static final char URL_PARAM_DELIM
- See Also:
- Constant Field Values
-
URL_PARAM_SEPARATOR
public static final char URL_PARAM_SEPARATOR
- See Also:
- Constant Field Values
-
-
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
-
-