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 StringgetFileName(String fullFileName) static Stringstatic CoordinategetLineCharPosition(String s, int index) Givenindexinto strings, compute the line and char position in line.static Stringstatic Stringstatic Stringstatic booleanreferenceEquals(Object x, Object y) Makes it clear when a comparison is intended as reference equality.static StringReplace >\> with >> in s.static Stringstatic Stringstatic StringGiven, say,file:/tmp/test.jar!/org/foo/templates/main.stgconvert tofile:/tmp/test.jar!/org/foo/templatesstatic StringStrip a single newline character from the front ofs.static StringStrip 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.stgconvert 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
Givenindexinto strings, compute the line and char position in line.
-