public class StringTools extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StringTools.ESCAPE
Defines escape encodings that are supported.
|
Constructor and Description |
---|
StringTools() |
Modifier and Type | Method and Description |
---|---|
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
|
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.Terrier 4.0. Copyright © 2004-2014 University of Glasgow