docs: public static String dequote(String str, int begin, int end, char quote)
      {
          // Is there anything to dequote?
          if (begin == end)
          {
              return "";
          }
  
          int endInt = str.indexOf(quote, begin);
  
          // If no quotes, return the original string
          // and save StringBuilder allocation/char copying
          if (endInt < 0)
          {
              return str.substring(begin, end);
          }
  
          StringBuilder sb     = new StringBuilder(end - begin);
          int          beginInt = begin; // need begin later
          do
          {
              if (((endInt + 1) >= end) || (str.charAt(endInt + 1) != quote))
              {
                  throw new IllegalArgumentException(
                      "Internal quote not doubled in string '"
                      + str.substring(begin, end) + "'");
              }
  
              sb.append(substring(str, beginInt, endInt)).append(quote);
              beginInt = endInt + 2;
              endInt = str.indexOf(quote, beginInt);
          }
          while ((endInt >= 0) && (endInt < end));
  
          return sb.append(substring(str, beginInt, end)).toString();
      }