public class StringCleaner
extends java.lang.Object
Constructor and Description |
---|
StringCleaner() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeInequalityChars(java.lang.String htmlString) |
static java.lang.String |
stripHtml(java.lang.String text)
Removes all html(or any xml i suppose...) tags from a string.
|
static java.lang.String |
stripHtmlExceptSuperscripts(java.lang.String text)
Removes all html(or any xml i suppose...) tags from a string except for subscripts and superscripts.
|
static java.lang.String |
truncateString(java.lang.String text,
int truncateAtCharPos) |
static java.lang.String |
truncateString(java.lang.String text,
int truncateAtCharPos,
java.lang.String trailerStr)
Removes any HTML, and then Cut the string to the given length,
and if it exceeds the length, append "..." to the end.
|
static java.lang.String |
truncateStringKeepSuperscripts(java.lang.String text,
int length)
Removes any HTML except subscripts or super scripts, and then Cut the string to the given length,
and if it exceeds the length, append "..." to the end.
|
static java.lang.String |
truncateStringORIG(java.lang.String text,
int length) |
public static java.lang.String stripHtml(java.lang.String text)
text
- public static java.lang.String stripHtmlExceptSuperscripts(java.lang.String text)
text
- public static java.lang.String escapeInequalityChars(java.lang.String htmlString)
public static java.lang.String truncateString(java.lang.String text, int truncateAtCharPos, java.lang.String trailerStr)
text
- truncateAtCharPos
- public static java.lang.String truncateString(java.lang.String text, int truncateAtCharPos)
public static java.lang.String truncateStringORIG(java.lang.String text, int length)
public static java.lang.String truncateStringKeepSuperscripts(java.lang.String text, int length)
text
- length
-