code: private static String unquote(String s) {
          if (s.indexOf('\'') < 0) {
              return s;
          }
          boolean isPrevQuote = false;
          boolean inQuote = false;
          StringBuilder buf = new StringBuilder();
          for (int i = 0; i < s.length(); i++) {
              char c = s.charAt(i);
              if (c == '\'') {
                  if (isPrevQuote) {
                      buf.append(c);
                      isPrevQuote = false;
                  } else {
                      isPrevQuote = true;
                  }
                  inQuote = !inQuote;
              } else {
                  isPrevQuote = false;
                  buf.append(c);
              }
          }
          return buf.toString();
      }
docs: Unquotes the message format style pattern.
  
  @param s the pattern
  @return the unquoted pattern string