|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 String |
escape(StringTools.ESCAPE e,
String s)
Escape a String according to the defined escape sequence requested |
static String |
normaliseEncoding(String encodingName)
Normalises several common encodings found, for instance in HTTP or HTML headers, into the compatible Java encoding |
static String |
unescape(StringTools.ESCAPE e,
String s)
Unescape a String according to the defined escape sequence requested |
static int |
utf8_length(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 String escape(StringTools.ESCAPE e,
String s)
public static String unescape(StringTools.ESCAPE e,
String s)
public static int utf8_length(String s)
s - The string to be measured.
public static String normaliseEncoding(String encodingName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||