public class StringUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
__ISO_8859_1 |
static String |
__LINE_SEPARATOR |
static String |
__UTF_8 |
Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
append(StringBuffer buf,
byte b,
int base) |
static void |
append(StringBuffer buf,
String s,
int offset,
int length)
Append substring to StringBuffer
|
static void |
append2digits(StringBuffer buf,
int i) |
static String |
asciiToLowerCase(String s)
fast lower case conversion.
|
static boolean |
endsWithIgnoreCase(String s,
String w) |
static boolean |
equals(String s,
char[] buf,
int offset,
int length) |
static int |
indexFrom(String s,
String chars)
returns the next index of a character from the chars string
|
static String |
nonNull(String s)
Return a non null string.
|
static String |
replace(String s,
String sub,
String with)
replace substrings within string.
|
static boolean |
startsWithIgnoreCase(String s,
String w) |
static String |
unquote(String s)
Remove single or double quotes.
|
public static final String __LINE_SEPARATOR
public static final String __ISO_8859_1
public static final String __UTF_8
public static String asciiToLowerCase(String s)
s
- the string to convertpublic static int indexFrom(String s, String chars)
public static String replace(String s, String sub, String with)
public static void append(StringBuffer buf, String s, int offset, int length)
buf
- StringBuffer to append tos
- String to append fromoffset
- The offset of the substringlength
- The length of the substringpublic static void append(StringBuffer buf, byte b, int base)
public static void append2digits(StringBuffer buf, int i)
public static String nonNull(String s)
s
- Stringpublic static boolean equals(String s, char[] buf, int offset, int length)
Copyright © 2013. All Rights Reserved.