public class StringUtils extends Object
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
CapitalFirstLetter(String name)
Capitalizes the first character of the string.
|
static String |
CleanEndingInt(String next) |
static String |
CleanForSQL(String temp) |
static String |
CleanForSQLTableName(String temp) |
static String |
CleanForSQLValue(String temp) |
static ArrayList<String> |
CommaDelimitedStringToArrayList(String s)
Translates the comma-delimited string to an ArrayList of strings.
|
static ArrayList<String> |
CommaDelimitedStringToArrayList(String s,
boolean trim)
Translates the comma-delimited string to an ArrayList of strings.
|
static int |
CountStringOccurrences(String fullString,
String searchFor) |
static String |
CreateAlias(String tableName,
String colName) |
static ArrayList<String> |
DelimitedStringToArrayList(String s,
String delimiter)
Translates the comma-delimited string to an ArrayList of strings.
|
static ArrayList<String> |
DelimitedStringToArrayList(String s,
String delimiter,
boolean trim)
Translates the comma-delimited string to an ArrayList of strings.
|
static boolean |
EndsWithInt(String next) |
static String |
FirstNChars(String name,
int num) |
static String |
FormatMethodNameToHeader(String method)
Reformats a Java Method Name into an acceptable header.
|
static String |
FormatMethodNameToSQL(String method)
removes 'get' and un-capitalizes every character and inserts a '_'.
|
static String |
FormatStringToClassName(String name)
Removes '_' characters and capitalizes the next character.
|
static String |
FormatStringToMethodName(String prefix,
String name)
Removes '_' characters and capitalizes the next character, and inserts the prefix before it.
|
static String |
FormatStringToMethodSignature(String name)
Removes '_' characters and capitalizes the next character.
|
static String |
GetDirName(String path)
Returns a substring with all characters before the last File.seperator.
|
static int |
GetEndingInt(String next) |
static String |
GetFieldText(String fullString) |
static String |
GetFileName(String path)
Returns a substring of all characters after the last File.seperator.
|
static String |
getLocalClassName(Class c)
Returns just the class name (without its package).
|
static GenericWrapperElement |
GetRootElement(String fullString) |
static String |
GetRootElementName(String fullString) |
static boolean |
HasContent(String s) |
static String |
InsertCharsIntoDelimitedString(String s,
String insert) |
static String |
intern(String s) |
static boolean |
IsAlphaNumericUnderscore(String s) |
static boolean |
IsEmpty(String s) |
static String |
Last30Chars(String s) |
static String |
Last62Chars(String s) |
static String |
MaxCharsAbbr(String name) |
static String |
MinCharsAbbr(String name) |
static boolean |
OccursBefore(String root,
String f,
String l) |
static String |
RegCharsAbbr(String name) |
static String |
RemoveChar(String _base,
char _old) |
static String |
ReplaceStr(String _base,
char _old,
char _new) |
static String |
ReplaceStr(String _base,
String _old,
String _new)
Replaces all instances of the Old string in the Base String with the New String.
|
static String |
SQLMaxCharsAbbr(String name) |
static String |
SQLMaxCharsAbbr(String tableName,
String colName) |
static String |
SQLSequenceFormat1(String table,
String keyName) |
static String |
SQLSequenceFormat2(String table,
String keyName) |
static String |
StandardizeXMLPath(String fullString) |
static String |
ToString(boolean b) |
static String |
WhiteSpace(int i) |
public static boolean IsEmpty(String s)
public static boolean HasContent(String s)
public static String ReplaceStr(String _base, String _old, String _new)
_base
- Original string_old
- String to be replaced_new
- String to be added.public static String WhiteSpace(int i)
public static String GetFileName(String path)
path
- public static String GetDirName(String path)
path
- public static String FormatMethodNameToHeader(String method)
method
- public static String FormatMethodNameToSQL(String method)
method
- public static String FormatStringToMethodName(String prefix, String name)
prefix
- name
- public static String FormatStringToClassName(String name)
name
- public static String FormatStringToMethodSignature(String name)
name
- public static String getLocalClassName(Class c)
c
- public static String CapitalFirstLetter(String name)
name
- public static ArrayList<String> CommaDelimitedStringToArrayList(String s)
s
- public static ArrayList<String> DelimitedStringToArrayList(String s, String delimiter)
s
- public static ArrayList<String> CommaDelimitedStringToArrayList(String s, boolean trim)
s
- public static ArrayList<String> DelimitedStringToArrayList(String s, String delimiter, boolean trim)
s
- public static int GetEndingInt(String next)
public static boolean EndsWithInt(String next)
public static String InsertCharsIntoDelimitedString(String s, String insert)
public static String ToString(boolean b)
public static int CountStringOccurrences(String fullString, String searchFor)
public static GenericWrapperElement GetRootElement(String fullString) throws ElementNotFoundException
ElementNotFoundException
public static boolean IsAlphaNumericUnderscore(String s)
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.