|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectliquibase.util.StringUtils
public class StringUtils
Various utility methods for working with strings.
Constructor Summary | |
---|---|
StringUtils()
|
Method Summary | |
---|---|
static String |
join(Collection<String> collection,
String delimiter)
|
static String |
join(int[] array,
String delimiter)
|
static String |
join(Integer[] array,
String delimiter)
|
static String |
join(String[] array,
String delimiter)
|
static String[] |
processMutliLineSQL(String multiLineSQL,
boolean stripComments,
boolean splitStatements,
String endDelimiter)
Removes any comments from multiple line SQL using stripComments(String)
and then extracts each individual statement using splitSQL(String, String) . |
static String |
repeat(String string,
int times)
|
static List<String> |
splitAndTrim(String s,
String regex)
|
static String[] |
splitSQL(String multiLineSQL,
String endDelimiter)
Splits a (possible) multi-line SQL statement along ;'s and "go"'s. |
static String |
stripComments(String multiLineSQL)
Searches through a String which contains SQL code and strips out any comments that are between \/**\/ or anything that matches SP--SP |
static String |
trimToEmpty(String string)
|
static String |
trimToNull(String string)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtils()
Method Detail |
---|
public static String trimToEmpty(String string)
public static String trimToNull(String string)
public static String[] processMutliLineSQL(String multiLineSQL, boolean stripComments, boolean splitStatements, String endDelimiter)
stripComments(String)
and then extracts each individual statement using splitSQL(String, String)
.
multiLineSQL
- A String containing all the SQL statementsstripComments
- If true then comments will be stripped, if false then they will be left in the codepublic static String[] splitSQL(String multiLineSQL, String endDelimiter)
public static String stripComments(String multiLineSQL)
public static String join(String[] array, String delimiter)
public static String join(Collection<String> collection, String delimiter)
public static List<String> splitAndTrim(String s, String regex)
public static String repeat(String string, int times)
public static String join(Integer[] array, String delimiter)
public static String join(int[] array, String delimiter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |