Class SplitIgnoreQuotes

java.lang.Object
io.deephaven.util.text.SplitIgnoreQuotes

public class SplitIgnoreQuotes extends Object
Splits a String on a character ignoring that character inside quotes and back ticks. For example splitting on a comma: 'a,b', "c,d", 'e', "f", g splits to ['a,b'] ["c,d"] ['e'] ["f"] [g]
  • Constructor Details

    • SplitIgnoreQuotes

      public SplitIgnoreQuotes()
  • Method Details

    • split

      public String[] split(String string, char splitter)
      Splits a String using the splitter character but ignoring it inside quotes and back ticks.
      Parameters:
      string - the String to split
      splitter - the character to split on
      Returns:
      a String array of split values