public class Translate
extends java.lang.Object
Note: Do not edit! This class is created by the Generate class.
Typical usage:
String s = Translate.decode(getTextFromHtmlPage());
Modifier and Type | Method and Description |
---|---|
static char |
convertToChar(java.lang.String string)
Convert a reference to a unicode character.
|
static java.lang.String |
convertToString(java.lang.Character character)
Convert a character to a character entity reference.
|
static java.lang.String |
convertToString(int character)
Convert a character to a numeric character reference.
|
static java.lang.String |
decode(java.lang.String string)
Decode a string containing references.
|
static java.lang.String |
encode(java.lang.String string)
Encode a string to use references.
|
static java.lang.String |
shrink(java.lang.String string)
It returns a string shrinked in size Replace ant character &..; by "w".
|
public static char convertToChar(java.lang.String string)
string
- The string to convert. Of the form &xxxx; or &#xxxx; with
or without the leading ampersand or trailing semi-colon.public static java.lang.String decode(java.lang.String string)
string
- The string to translate.public static java.lang.String shrink(java.lang.String string)
string
- The string to translate.public static java.lang.String convertToString(java.lang.Character character)
character
- The character to convert.null
if the character is
not one of the known entity references.public static java.lang.String convertToString(int character)
character
- The character to convert.public static java.lang.String encode(java.lang.String string)
Character
for each character in the string, but this class
is primarily intended to decode strings so efficiency and speed in the
encoding was not a priority.string
- The string to translate.JHepSim. A part of HSTOOLS. version-1.2