code: static void escape(@Nonnull StringBuilder buf, @Nonnull CharSequence cs) {
          if (buf == null)
              throw new NullPointerException("Buffer was null.");
          if (cs == null)
              throw new NullPointerException("CharSequence was null.");
          for (int i = 0; i < cs.length(); i++) {
              char c = cs.charAt(i);
              switch (c) {
                  case '\\':
                      buf.append("\\\\");
                      break;
                  case '"':
                      buf.append("\\\"");
                      break;
                  case '\n':
                      buf.append("\\n");
                      break;
                  case '\r':
                      buf.append("\\r");
                      break;
                  default:
                      buf.append(c);
              }
          }
      }
docs: /* pp