Class StringSplitter

java.lang.Object
org.csstudio.java.string.StringSplitter

public class StringSplitter extends Object
Split string into segments
  • 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 split
      splitChar - Character used to split the source string, e.g. ',' or ' '
      deleteHeadTailQuotes - Delete quotes in the head and tail of individual elements if true
      Returns:
      Array of individual elements
      Throws:
      Exception - on parse error (missing end of quoted string)