java.lang.Object
org.apache.camel.quarkus.support.debezium.graal.StringUtil

class StringUtil extends Object
  • Constructor Details

    • StringUtil

      StringUtil()
  • Method Details

    • csvSplit

      public static String[] csvSplit(String s)
      Parse a CSV string using csvSplit(List, String, int, int)
      Parameters:
      s - The string to parse
      Returns:
      An array of parsed values.
    • csvSplit

      public static String[] csvSplit(String s, int off, int len)
      Parse a CSV string using csvSplit(List, String, int, int)
      Parameters:
      s - The string to parse
      off - The offset into the string to start parsing
      len - The len in characters to parse
      Returns:
      An array of parsed values.
    • csvSplit

      public static List<String> csvSplit(List<String> list, String s, int off, int len)
      Split a quoted comma separated string to a list

      Handle rfc4180-like CSV strings, with the exceptions:

      • quoted values may contain double quotes escaped with back-slash
      • Non-quoted values are trimmed of leading trailing white space
      • trailing commas are ignored
      • double commas result in a empty string value
      Parameters:
      list - The Collection to split to (or null to get a new list)
      s - The string to parse
      off - The offset into the string to start parsing
      len - The len in characters to parse
      Returns:
      list containing the parsed list values