Changeset 18824
- Timestamp:
- 04/14/17 12:27:38 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/tools.cc
r16803 r18824 227 227 //! If the map is also empty the file name was empty, if the map has 228 228 //! one entry then for this entry the equal sign was missing. 229 //! 229 // 230 //! allow==true allows for positional (empty) arguments, like in 231 //! file.txt arg1 arg2="argument 2" arg3 232 //! 233 #include <iostream> 230 234 map<string,string> Tools::Split(string &opt, bool allow) 231 235 { … … 248 252 map<string,string> rc; 249 253 250 int i=-1;254 int cnt=0; 251 255 252 256 for (; it!=tok.end(); it++) … … 254 258 if (it->empty()) 255 259 continue; 256 257 i++;258 260 259 261 const size_t pos = it->find_first_of('='); … … 262 264 if (allow) 263 265 { 264 rc[to_string(i)] = *it; 266 std::cout << "|" << *it << "|" << std::endl; 267 rc[to_string(cnt++)] = *it; 265 268 continue; 266 269 }
Note:
See TracChangeset
for help on using the changeset viewer.