WriteString writes a zero-terminated string
(str string)
| 76 | |
| 77 | // WriteString writes a zero-terminated string |
| 78 | func (w *BinWriter) WriteString(str string) { |
| 79 | buf := []byte(str) |
| 80 | w.WritePu64(int64(len(buf) + 1)) |
| 81 | w.b.Write(buf) |
| 82 | w.b.WriteByte(0) |
| 83 | } |
| 84 | |
| 85 | // Write writes a byte buffer |
| 86 | func (w *BinWriter) Write(buf []byte) { |
no test coverage detected