public final class StringUtilities extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FOLDER_SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static int |
count(String s,
char c) |
static byte[] |
decode(String s) |
static String |
encode(byte[] bytes)
Convert a byte array into a printable format containing a
String of hex digit characters (two per byte).
|
static boolean |
equals(String str1,
String str2) |
static boolean |
equalsIgnoreCase(String s1,
String s2) |
static boolean |
equalsIgnoreCaseWithTrim(String s1,
String s2) |
static boolean |
equalsWithTrim(String s1,
String s2) |
static boolean |
hasContent(String s) |
static boolean |
isEmpty(String s) |
static int |
lastIndexOf(String path,
char ch) |
static int |
length(String s)
Use this method when you don't want a length check to
throw a NullPointerException when
|
static int |
trimLength(String s)
Returns the length of the trimmed string.
|
public static final String FOLDER_SEPARATOR
public static boolean isEmpty(String s)
public static boolean hasContent(String s)
public static int length(String s)
s
- string to return length ofpublic static int trimLength(String s)
public static int lastIndexOf(String path, char ch)
public static byte[] decode(String s)
public static String encode(byte[] bytes)
bytes
- array representationpublic static int count(String s, char c)
Copyright © 2013. All rights reserved.