|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.utility.StringTools
public class StringTools
This class implements useful string functions
Nested Class Summary | |
---|---|
static class |
StringTools.ESCAPE
Defines escape encodings that are supported. |
Constructor Summary | |
---|---|
StringTools()
|
Method Summary | |
---|---|
static java.lang.String |
escape(StringTools.ESCAPE e,
java.lang.String s)
Escape a String according to the defined escape sequence requested |
static java.lang.String |
normaliseEncoding(java.lang.String encodingName)
Normalises several common encodings found, for instance in HTTP or HTML headers, into the compatible Java encoding |
static java.lang.String |
unescape(StringTools.ESCAPE e,
java.lang.String s)
Unescape a String according to the defined escape sequence requested |
static int |
utf8_length(java.lang.String s)
Returns how long String s is in bytes, if encoded in UTF-8 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringTools()
Method Detail |
---|
public static java.lang.String escape(StringTools.ESCAPE e, java.lang.String s)
public static java.lang.String unescape(StringTools.ESCAPE e, java.lang.String s)
public static int utf8_length(java.lang.String s)
s
- The string to be measured.
public static java.lang.String normaliseEncoding(java.lang.String encodingName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |