Lines splits a given block of text into separate lines.
(txt string)
| 32 | |
| 33 | // Lines splits a given block of text into separate lines. |
| 34 | func (hdlr Plain) Lines(txt string) []string { |
| 35 | txt = strings.TrimRight(txt, "\n") |
| 36 | return strings.Split(txt, "\n") |
| 37 | } |
| 38 | |
| 39 | // Box returns the bounding box of the given non-multiline text where: |
| 40 | // - width is the horizontal space from the origin. |