public class Misc extends Object
| Constructor and Description |
|---|
Misc()
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getFileName(String
|
static String |
getFileNameNoSuffix(String
|
static Coordinate |
getLineCharPosition(String
Given
index into string
s, compute the line and char position in line.
|
static String |
getParent(String
|
static String |
getPrefix(String
|
static String |
join(Iterator
|
static boolean |
referenceEquals(Object
Makes it clear when a comparison is intended as reference equality.
|
static String |
replaceEscapedRightAngle(String
Replace >\> with >> in s.
|
static String |
replaceEscapes(String
|
static String |
strip(String
|
static String |
stripLastPathElement(String
Given, say,
file:/tmp/test.jar!/org/foo/templates/main.stg convert to
file:/tmp/test.jar!/org/foo/templates
|
static String |
trimOneStartingNewline(String
Strip a single newline character from the front of
s.
|
static String |
trimOneTrailingNewline(String
Strip a single newline character from the end of
s.
|
static boolean |
urlExists(URL
|
public static final Stringnewline
public static boolean referenceEquals(Objectx, Object y)
public static StringtrimOneStartingNewline(String s)
s.
public static StringtrimOneTrailingNewline(String s)
s.
public static StringstripLastPathElement(String f)
file:/tmp/test.jar!/org/foo/templates/main.stg convert to
file:/tmp/test.jar!/org/foo/templates
public static StringreplaceEscapedRightAngle(String s)
public static boolean urlExists(URLurl)
public static CoordinategetLineCharPosition(String s, int index)
index into string
s, compute the line and char position in line.