|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectru.biosoft.util.TextUtil
Различные утилиты для работы с текстовыми данными.
| Constructor Summary | |
TextUtil()
|
|
| Method Summary | |
static void |
addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue)
|
static void |
addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue,
int maxFieldLen)
|
static void |
addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue,
int maxStrLen,
java.lang.String delimiter)
Add the field to the specified string if the field value is not empty. |
static void |
addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue,
java.lang.String delimiter)
|
static java.lang.String |
convertHTML(java.lang.String html)
Convert HTML document to text. |
static java.lang.String |
getField(java.lang.String entry,
java.lang.String field)
Returns specified field from the specified entry. |
static java.lang.String |
getField(java.lang.String entry,
java.lang.String field,
char delimiter)
Returns specified field from the specified entry. |
static java.lang.String |
getSection(java.lang.String section,
java.lang.String str)
Returns the specified section from the specified string. |
static java.lang.String |
getSection(java.lang.String section,
java.lang.String str,
int offset)
Returns the specified section from the specified string. |
static java.lang.String |
htmlMakeBold(java.lang.String text)
|
static java.lang.String |
htmlMakeChangeFont(java.lang.String text,
int diff)
|
static java.lang.String |
htmlMakeHTML(java.lang.String text)
|
static java.lang.String |
htmlMakeItalic(java.lang.String text)
|
static java.lang.String |
htmlMakeParagraph(java.lang.String text)
|
static java.lang.String |
htmlMakeUnderline(java.lang.String text)
|
static java.lang.String |
insertToString(java.lang.String str,
int offset,
java.lang.String what)
Insert the specified string in other string in specified position. |
static int |
parseInt(java.lang.String s,
int from)
Parse integer from the string. |
static java.lang.String |
valueOf(double value,
int decDig)
Returns string, that represents double value, with specified number of decimal didits. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextUtil()
| Method Detail |
public static int parseInt(java.lang.String s,
int from)
throws java.lang.NumberFormatException
s - string that contains the integerfrom - start position in the string
java.lang.NumberFormatException
public static java.lang.String valueOf(double value,
int decDig)
If the value indeed is the integer, than the decimal digits are omitted.
value - double valuedecDig - number of decimal digits
public static java.lang.String insertToString(java.lang.String str,
int offset,
java.lang.String what)
str - the string for insertion.offset - the insertion positin.what - the inserted string.
public static java.lang.String getSection(java.lang.String section,
java.lang.String str,
int offset)
section - section namestr - the string containing this sectionoffset - position in the string from wich first section
will be found.
public static java.lang.String getSection(java.lang.String section,
java.lang.String str)
section - section namestr - the string containing this sectionpublic static java.lang.String convertHTML(java.lang.String html)
public static java.lang.String getField(java.lang.String entry,
java.lang.String field,
char delimiter)
If field consists from several lines, they must be a single block, without other fields inside them.
entry - entry textfield - field (line) namedelimiter - if the field consists from several lines
the specified character will be inserted as delimiter between lines.
public static java.lang.String getField(java.lang.String entry,
java.lang.String field)
If the field consists from several lines space is used as delimiter.
entry - entry textfield - field (line) namegetField(String entry, String field, char delimiter)
public static void addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue,
int maxStrLen,
java.lang.String delimiter)
str - string to which the field name and value
will be added.fieldName - field name.fieldValue - field valuemaxStrLen - the maximum field string length.
If the field value is longer then maxFieldLen,
it will be divided to several strings.
public static void addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue,
int maxFieldLen)
public static void addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue)
public static void addField(java.lang.StringBuffer str,
java.lang.String fieldName,
java.lang.String fieldValue,
java.lang.String delimiter)
public static java.lang.String htmlMakeHTML(java.lang.String text)
public static java.lang.String htmlMakeBold(java.lang.String text)
public static java.lang.String htmlMakeItalic(java.lang.String text)
public static java.lang.String htmlMakeUnderline(java.lang.String text)
public static java.lang.String htmlMakeParagraph(java.lang.String text)
public static java.lang.String htmlMakeChangeFont(java.lang.String text,
int diff)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||