public class StringExtensions extends Object
| Constructor and Description |
|---|
StringExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static String |
addDoubleQuotationMarks(String s)
Puts to the given String at the start and end quotes.
|
static String |
addSingleQuotationMarks(String s)
Puts to the given String at the start and end quotes.
|
static String |
firstCharacterToLowerCase(String fieldName)
Sets the first character from the given string to lower case and returns it.
|
static String |
firstCharacterToUpperCase(String fieldName)
Sets the first character from the given string to upper case and returns it.
|
static boolean |
isNullOrEmpty(String str)
The method isNullOrEmpty(String) checks if the given String is empty or null.
|
static boolean |
isNumber(String testString)
Checks if the given String is an Number.
|
static String |
lastCharacter(String str)
Gets the last character of the given String object.
|
static String |
removeQuotationMarks(String s)
Removes from the given String at the start and end quotes.
|
static String |
replaceLast(String original,
String findString,
String replacement)
Replaces the last occurrence of a String within another String.
|
static String |
toUnicode(String toUnicode,
boolean toLowerCase)
Converts all characters from the given String to unicodes characters encoded like \uxxxx.
|
static String |
toUnicodeChars(String s,
boolean toLowerCase)
Converts all characters from the given String to unicodes characters encoded like \uxxxx.
|
public static final String addDoubleQuotationMarks(String s)
s - The String to handle.public static final String addSingleQuotationMarks(String s)
s - The String to handle.public static final String firstCharacterToLowerCase(String fieldName)
fieldName - The String to modify.public static final String firstCharacterToUpperCase(String fieldName)
fieldName - The String to modify.public static final boolean isNullOrEmpty(String str)
str - The String to check.public static final boolean isNumber(String testString)
testString - The String to check.public static String lastCharacter(String str)
str - the strpublic static final String removeQuotationMarks(String s)
s - The String to handle.public static final String replaceLast(String original, String findString, String replacement)
original - The String to search.findString - The search pattern.replacement - Replace with that String.public static String toUnicode(String toUnicode, boolean toLowerCase)
toUnicode - The String to convert.toLowerCase - If true the letters from the unicode characters are lower case.public static String toUnicodeChars(String s, boolean toLowerCase)
s - The String to convert.toLowerCase - If true the letters from the unicode characters are lower case.Copyright © 2007–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.