code: func writeProtoStringLines(w *bytes.Buffer, skip int, lines []string) {
  	// equivalent to C's isprint.
  	isprint := func(c byte) bool {
  		return c >= 0x20 && c < 0x7f
  	}
  
  	w.WriteByte('"')
  	for lIdx, line := range lines {
  		if lIdx != 0 {
  			// to get a "\\n".join(lines) effect: newlines between lines, but not
  			// trailing.
  			w.WriteString(`\n`)
  		}
  		// Loop over the bytes, not the runes.
  		for i := skip; i < len(line); i++ {
  			// Divergence from C++: we don't escape apostrophes.
  			// There's no need to escape them, and the C++ parser
  			// copes with a naked apostrophe.
  			switch c := line[i]; c {
  			case '\n':
  				w.WriteString(`\n`)
  			case '\r':
  				w.WriteString(`\r`)
  			case '\t':
  				w.WriteString(`\t`)
  			case '"':
  				w.WriteString(`\"`)
  			case '\\':
  				w.WriteString(`\\`)
  			default:
  				if isprint(c) {
  					w.WriteByte(c)
  				} else {
  					fmt.Fprintf(w, "\\%03o", c)
  				}
  			}
  		}
  	}
  	w.WriteByte('"')
  }
docs: // writeProtoString writes the given lines into the output writer while
  // correctly escaping it. This code is heavily inspired by
  // "github.com/golang/protobuf/proto/text.go".