Package org.csstudio.java.string
Class StringSplitter
java.lang.Object
org.csstudio.java.string.StringSplitter
Split string into segments
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
splitIgnoreInQuotes
(String source, char splitChar, boolean deleteHeadTailQuotes) Split source string into an array of elements separated by the splitting character, but ignoring split characters enclosed in quotes.
-
Method Details
-
splitIgnoreInQuotes
public static String[] splitIgnoreInQuotes(String source, char splitChar, boolean deleteHeadTailQuotes) throws Exception Split source string into an array of elements separated by the splitting character, but ignoring split characters enclosed in quotes.- Parameters:
source
- String to be splitsplitChar
- Character used to split the source string, e.g. ',' or ' 'deleteHeadTailQuotes
- Delete quotes in the head and tail of individual elements iftrue
- Returns:
- Array of individual elements
- Throws:
Exception
- on parse error (missing end of quoted string)
-