docs: public static String escape(char c) {
          switch (c) {
              case '\b':
                  return "\\b";
              case '\t':
                  return "\\t";
              case '\n':
                  return "\\n";
              case '\f':
                  return "\\f";
              case '\r':
                  return "\\r";
              case '"':
                  return "\\\"";
              case '\'':
                  return "\\'";
              case '\\':
                  return "\\\\";
              default:
                  if (c < 32 || c == 127) {
                      return String.format("\\%03o", (int) c);
                  } else if (!isConsolePrintable(c) ||
                             isHighSurrogate(c) ||
                             isLowSurrogate(c)) {
                      return String.format("\\u%04x", (int) c);
                  }
                  return String.valueOf(c);
          }
      }