public class StringUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
putInQuotes(String input,
Character quoteChar)
Puts a string in quotes.
|
static String[] |
splitQuoted(String input,
Character split)
Splits a string and returns the parts as array.
|
static void |
splitQuoted(String input,
Character split,
List<String> parts)
Split an input string at a specified split-character into several parts.
|
public static String putInQuotes(String input, Character quoteChar)
input - string to put in quotesquoteChar - quote charpublic static String[] splitQuoted(String input, Character split)
input - string to splitsplit - split charsplitQuoted(String, Character, List)public static void splitQuoted(String input, Character split, List<String> parts)
"testA testB testB" -> [testA,testB,testC]
"'testA testB' testB" -> [testA testB,testC]
input - input stringsplit - char used to splitparts - list filled with the resulting partsCopyright © 2017. All rights reserved.