public class TextUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static char[] |
hexTable
Hexademical characters.
|
static BitSet |
URISave |
static BitSet |
URISaveEx |
| Constructor and Description |
|---|
TextUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
escape(String string,
char escape,
boolean isPath)
Escapes string using escape symbol.
|
static String |
getExtension(String filename)
Extracts the extension of the file.
|
static boolean |
isMediaFile(String mimeType)
Checks if Mime-Type is media mime type.
|
static String |
nameOnly(String path)
Cuts the current name from the path.
|
static String |
parentPath(String path) |
static String |
pathOnly(String path)
Cuts the path from string.
|
static String |
relativizePath(String path)
Creates relative path from string.
|
static String |
relativizePath(String path,
boolean withIndex)
Creates relative path from string.
|
static String |
removeIndexFromPath(String path)
Removes the index from the path if it has an index defined
|
static String |
unescape(String string,
char escape)
Unescapes string using escape symbol.
|
public static BitSet URISave
public static BitSet URISaveEx
public static final char[] hexTable
public static String unescape(String string, char escape)
string - stringescape - escape symbolpublic static String escape(String string, char escape, boolean isPath)
string - stringescape - escape symbolisPath - if the string is pathpublic static String relativizePath(String path)
path - pathpublic static String relativizePath(String path, boolean withIndex)
path - pathwithIndex - indicates whether we should keep the index or notpublic static String removeIndexFromPath(String path)
public static String pathOnly(String path)
path - full pathpublic static String nameOnly(String path)
path - pathpublic static boolean isMediaFile(String mimeType)
mimeType - Mime-TypeCopyright © 2016 eXo Platform SAS. All Rights Reserved.