public final class HtmlUtils
extends java.lang.Object
| Constructor and Description |
|---|
HtmlUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
bold(java.lang.String text)
Returns HTML with specified text made bold.
|
static java.lang.String |
convertToMultilineHtml(java.lang.String text,
java.lang.String... lineBreak)
Returns text converted into multiline HTML.
|
static java.lang.String |
getContent(java.lang.String text)
Returns HTML content between body or html tags.
|
static java.lang.String |
getPlainText(java.lang.String html)
Returns plain text extracted from the specified HTML.
|
static boolean |
hasHtml(java.lang.String text)
Returns whether specified text contains HTML tag or not.
|
static boolean |
hasTag(java.lang.String text,
java.lang.String tag)
Returns whether text contains the specified tag or not.
|
static boolean |
hasTags(java.lang.String text)
Returns whether the specified text contains HTML tags or not.
|
public static java.lang.String getPlainText(java.lang.String html)
html - HTMLpublic static java.lang.String bold(java.lang.String text)
text - text to processpublic static boolean hasTags(java.lang.String text)
text - text to processpublic static boolean hasHtml(java.lang.String text)
text - text to processpublic static boolean hasTag(java.lang.String text,
java.lang.String tag)
text - text to processtag - tag to findpublic static java.lang.String getContent(java.lang.String text)
text - text to processpublic static java.lang.String convertToMultilineHtml(java.lang.String text,
java.lang.String... lineBreak)
text - text to convertlineBreak - line break text