Split a string on "\n" while preserving them. The output can be used as input for UnifiedDiff and ContextDiff structures.
(s string)
| 766 | // Split a string on "\n" while preserving them. The output can be used |
| 767 | // as input for UnifiedDiff and ContextDiff structures. |
| 768 | func SplitLines(s string) []string { |
| 769 | lines := strings.SplitAfter(s, "\n") |
| 770 | lines[len(lines)-1] += "\n" |
| 771 | return lines |
| 772 | } |
no outgoing calls
searching dependent graphs…