Lines returns the array of all the lines.
()
| 373 | |
| 374 | // Lines returns the array of all the lines. |
| 375 | func (d *Document) Lines() []string { |
| 376 | // TODO: Cache, because this one is reused very often. |
| 377 | return strings.Split(d.Text, "\n") |
| 378 | } |
| 379 | |
| 380 | // LineCount return the number of lines in this document. If the document ends |
| 381 | // with a trailing \n, that counts as the beginning of a new line. |
no outgoing calls