Package org.stringtemplate.v4.misc
Class Misc
java.lang.Object
org.stringtemplate.v4.misc.Misc
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getFileName
(String fullFileName) static String
static Coordinate
getLineCharPosition
(String s, int index) Givenindex
into strings
, compute the line and char position in line.static String
static String
static String
static boolean
referenceEquals
(Object x, Object y) Makes it clear when a comparison is intended as reference equality.static String
Replace >\> with >> in s.static String
static String
static String
Given, say,file:/tmp/test.jar!/org/foo/templates/main.stg
convert tofile:/tmp/test.jar!/org/foo/templates
static String
Strip a single newline character from the front ofs
.static String
Strip a single newline character from the end ofs
.static boolean
-
Field Details
-
newline
-
-
Constructor Details
-
Misc
public Misc()
-
-
Method Details
-
referenceEquals
Makes it clear when a comparison is intended as reference equality. -
join
-
strip
-
trimOneStartingNewline
Strip a single newline character from the front ofs
. -
trimOneTrailingNewline
Strip a single newline character from the end ofs
. -
stripLastPathElement
Given, say,file:/tmp/test.jar!/org/foo/templates/main.stg
convert tofile:/tmp/test.jar!/org/foo/templates
-
getFileNameNoSuffix
-
getFileName
-
getParent
-
getPrefix
-
replaceEscapes
-
replaceEscapedRightAngle
Replace >\> with >> in s.Replace \> with > in s, unless prefix of \>>>.
Do NOT replace if it's <\\>
-
urlExists
-
getLineCharPosition
Givenindex
into strings
, compute the line and char position in line.
-