@OpenApiAll
public class TextUtils
extends java.lang.Object
Constructor and Description |
---|
TextUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isFullHtml(java.lang.String text)
Checks if given text is html text, but not a "light" one.
|
static boolean |
isHtml(java.lang.String text)
Checks if given text is html text.
|
static boolean |
isLightHtml(java.lang.String text)
Checks if given text is "light" html.
|
static boolean |
isPlainText(java.lang.String text)
Checks if given text is rich text.
|
static boolean |
isRichText(java.lang.String text)
Checks if given text is rich text.
|
static java.lang.String |
toFullHtml(java.lang.String text)
Converts given text to full html.
|
static java.lang.String |
toLightHtml(java.lang.String text)
Converts given text to light html.
|
static java.lang.String |
toLightHtmlIfFullHtml(java.lang.String text)
Converts given text to light html if text is full html, otherwise returns the same text.
|
static java.lang.String |
toLightHtmlIfRichText(java.lang.String text)
Converts given rich text to light html, otherwise returns the same text.
|
static java.lang.String |
toPlainText(java.lang.String text)
Converts given rich or html text to plain text.
|
static java.lang.String |
toPlainTextIfFullHtml(java.lang.String text)
Converts given full html text to plain text, otherwise returns the same text
|
static java.lang.String |
toPlainTextIfHtml(java.lang.String text)
Converts given html text to plain text, otherwise returns the same text
|
static java.lang.String |
toPlainTextIfLightHtml(java.lang.String text)
Converts given light html text to plain text, otherwise returns the same text
|
static java.lang.String |
toRichText(java.lang.String text)
Converts given html text to rich text, otherwise returns the same text.
|
static java.lang.String |
toRichTextIfLightHtml(java.lang.String text)
Converts given light html to rich text, otherwise returns the same text.
|
public static boolean isHtml(@CheckForNull java.lang.String text)
text
- textpublic static boolean isFullHtml(@CheckForNull java.lang.String text)
text
- textpublic static boolean isLightHtml(@CheckForNull java.lang.String text)
text
- textpublic static boolean isRichText(@CheckForNull java.lang.String text)
text
- textpublic static boolean isPlainText(@CheckForNull java.lang.String text)
text
- textpublic static java.lang.String toFullHtml(java.lang.String text)
text
- textpublic static java.lang.String toLightHtmlIfFullHtml(java.lang.String text)
text
- textpublic static java.lang.String toLightHtml(java.lang.String text)
text
- textpublic static java.lang.String toRichText(java.lang.String text)
text
- textpublic static java.lang.String toRichTextIfLightHtml(java.lang.String text)
text
- textpublic static java.lang.String toLightHtmlIfRichText(java.lang.String text)
text
- textpublic static java.lang.String toPlainText(java.lang.String text)
text
- textpublic static java.lang.String toPlainTextIfLightHtml(java.lang.String text)
text
- textpublic static java.lang.String toPlainTextIfHtml(java.lang.String text)
text
- textpublic static java.lang.String toPlainTextIfFullHtml(java.lang.String text)
text
- text