SetText sets the text to the given bytes. Pass nil to initialize an empty buffer.
(text []byte)
| 198 | // SetText sets the text to the given bytes. |
| 199 | // Pass nil to initialize an empty buffer. |
| 200 | func (tb *Buffer) SetText(text []byte) *Buffer { |
| 201 | tb.Init() |
| 202 | tb.Lines.SetText(text) |
| 203 | tb.signalEditors(bufferNew, nil) |
| 204 | return tb |
| 205 | } |
| 206 | |
| 207 | // SetString sets the text to the given string. |
| 208 | func (tb *Buffer) SetString(txt string) *Buffer { |
no test coverage detected