- Timestamp:
- 06/03/12 21:39:02 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/tools.cc
r13713 r14054 156 156 //! one entry then for this entry the euqal sign was missing. 157 157 //! 158 map<string,string> Tools::Split(string &opt )158 map<string,string> Tools::Split(string &opt, bool allow) 159 159 { 160 160 using namespace boost; … … 176 176 map<string,string> rc; 177 177 178 int i=-1; 179 178 180 for (; it!=tok.end(); it++) 179 181 { 182 if (it->empty()) 183 continue; 184 185 i++; 186 180 187 const size_t pos = it->find_first_of('='); 181 188 if (pos==string::npos) 182 189 { 190 if (allow) 191 { 192 rc[to_string(i)] = *it; 193 continue; 194 } 195 183 196 opt = ""; 184 197 rc.clear(); -
trunk/FACT++/src/tools.h
r13713 r14054 13 13 std::string Wrap(std::string &str, size_t width=78); 14 14 15 std::map<std::string,std::string> Split(std::string & );15 std::map<std::string,std::string> Split(std::string &, bool = false); 16 16 std::string Uncomment(const std::string &opt); 17 17 }
Note:
See TracChangeset
for help on using the changeset viewer.