Sort an outline at every level: Difference between revisions
m
Added an extra comment.
(New post.) |
m (Added an extra comment.) |
||
Line 287:
enum Sort { ASCENDING, DESCENDING };
// Correct the given outline if necessary and sort it at every level using the given sort.
void sorted_outline(const std::string& outline, const Sort& sort) {
std::vector<std::string> lines = split_string(outline, '\n');
|