Sort sorts the lex elements by starting pos, and ending pos *decreasing* if a tie
()
| 83 | |
| 84 | // Sort sorts the lex elements by starting pos, and ending pos *decreasing* if a tie |
| 85 | func (ll *Line) Sort() { |
| 86 | sort.Slice((*ll), func(i, j int) bool { |
| 87 | return (*ll)[i].St < (*ll)[j].St || ((*ll)[i].St == (*ll)[j].St && (*ll)[i].Ed > (*ll)[j].Ed) |
| 88 | }) |
| 89 | } |
| 90 | |
| 91 | // DeleteIndex deletes at given index |
| 92 | func (ll *Line) DeleteIndex(idx int) { |