| 2098 | } |
| 2099 | |
| 2100 | std::vector<std::string> TextEditor::GetTextLines() const |
| 2101 | { |
| 2102 | std::vector<std::string> result; |
| 2103 | |
| 2104 | result.reserve(mLines.size()); |
| 2105 | |
| 2106 | for (auto & line : mLines) |
| 2107 | { |
| 2108 | std::string text; |
| 2109 | |
| 2110 | text.resize(line.size()); |
| 2111 | |
| 2112 | for (size_t i = 0; i < line.size(); ++i) |
| 2113 | text[i] = line[i].mChar; |
| 2114 | |
| 2115 | result.emplace_back(std::move(text)); |
| 2116 | } |
| 2117 | |
| 2118 | return result; |
| 2119 | } |
| 2120 | |
| 2121 | std::string TextEditor::GetSelectedText() const |
| 2122 | { |
no test coverage detected