///////////////////////////////////////////////////////////////////////////
| 137 | |
| 138 | //////////////////////////////////////////////////////////////////////////////// |
| 139 | std::vector<std::string> CmdEdit::findValues(const std::string& text, const std::string& name) { |
| 140 | std::vector<std::string> results; |
| 141 | std::string::size_type found = 0; |
| 142 | |
| 143 | while (found != std::string::npos) { |
| 144 | found = text.find(name, found + 1); |
| 145 | if (found != std::string::npos) { |
| 146 | auto eol = text.find('\n', found + 1); |
| 147 | if (eol != std::string::npos) { |
| 148 | auto value = text.substr(found + name.length(), eol - (found + name.length())); |
| 149 | |
| 150 | found = eol - 1; |
| 151 | results.push_back(Lexer::trim(value, "\t ")); |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | return results; |
| 157 | } |
| 158 | |
| 159 | //////////////////////////////////////////////////////////////////////////////// |
| 160 | std::string CmdEdit::formatDate(Task& task, const std::string& attribute, |