|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.StringUtils
public final class StringUtils
Utility class that helps to work with String class.
| Method Summary | |
|---|---|
static String |
concatenateWords(String string)
Removes all spaces from the given string and returns a concatenated result string. |
static boolean |
containsLetters(String string)
Indicates if the given string contains any letters. |
static String |
convertCamelCaseToDisplayString(String camelCase)
Gets a String which represents the conversion of a specific camel-case formatted String to a more human-readable form (i.e. |
static InputStream |
fromString(String string)
Creates InputStream from the string in UTF8 encoding. |
static InputStream |
fromString(String string,
String encoding)
Creates InputStream from the string in the specified encoding. |
static byte[] |
getUTF8Bytes(String string)
Returns the UTF8 bytes for string and handles the unlikely case where UTF-8 is not supported. |
static String |
getUTF8String(byte[] bytes)
Converts string into an UTF8 String and handles the unlikely case where UTF-8 is not supported. |
static boolean |
isEquals(String s1,
String s2)
Indicates whether strings are equal. |
static boolean |
isNullOrEmpty(String s)
Indicates whether string is null or empty. |
static boolean |
isNullOrEmpty(String s,
boolean trim)
Indicates whether string is null or empty. |
static boolean |
isNumber(String string)
Indicates if the given string is composed only of digits or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String convertCamelCaseToDisplayString(String camelCase)
camelCase - a camel-case (or Pascal-case) formatted String
from which a human-readable String is to be constructed
public static boolean isNullOrEmpty(String s)
s - the string to analyze.
public static boolean isNullOrEmpty(String s,
boolean trim)
s - the string to analyze.trim - indicates whether to trim the string.
public static boolean isEquals(String s1,
String s2)
s1 - the string to analyze.s2 - the string to analyze.
public static InputStream fromString(String string)
throws UnsupportedEncodingException
string - the string to convert.
UnsupportedEncodingException - if UTF8 is unsupported.
public static InputStream fromString(String string,
String encoding)
throws UnsupportedEncodingException
string - the string to convert.encoding - the encoding
UnsupportedEncodingException - if the encoding is unsupported.public static byte[] getUTF8Bytes(String string)
string - the String whose bytes we'd like to obtain.
public static String getUTF8String(byte[] bytes)
bytes - the byte array that we'd like to convert into a
String.
public static boolean isNumber(String string)
string - the string to check
public static boolean containsLetters(String string)
string - the string to check for letters
public static String concatenateWords(String string)
string - the string to concatenate
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||