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 |
toLowerCase(String value)
Rewrote the toLowercase method to improve performances.
|
static String |
toUpperCase(String value) |
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.public static String normaliseEncoding(String encodingName)
public static final String toLowerCase(String value)
value
- The String to lowercaseTerrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow