- Timestamp:
- 11/25/15 15:35:51 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STIdxIter.h
r2921 r3078 16 16 using namespace casa ; 17 17 18 namespace {19 vector<string> split(const string &str, char delim)20 {21 vector<string> result;22 size_t current = 0;23 size_t found;24 while ((found = str.find_first_of(delim, current)) != string::npos) {25 result.push_back(string(str, current, found - current));26 current = found + 1;27 }28 result.push_back(string(str, current, str.size() - current));29 return result;30 }31 } // anonymous namespace18 //namespace { 19 //vector<string> split(const string &str, char delim) 20 //{ 21 // vector<string> result; 22 // size_t current = 0; 23 // size_t found; 24 // while ((found = str.find_first_of(delim, current)) != string::npos) { 25 // result.push_back(string(str, current, found - current)); 26 // current = found + 1; 27 // } 28 // result.push_back(string(str, current, str.size() - current)); 29 // return result; 30 //} 31 //} // anonymous namespace 32 32 33 33 namespace asap { … … 65 65 virtual void init(); 66 66 private: 67 static vector<string> split(const string &str, char delim) 68 { 69 vector<string> result; 70 size_t current = 0; 71 size_t found; 72 while ((found = str.find_first_of(delim, current)) != string::npos) { 73 result.push_back(string(str, current, found - current)); 74 current = found + 1; 75 } 76 result.push_back(string(str, current, str.size() - current)); 77 return result; 78 } 67 79 vector<uInt> tovector(Vector<uInt> v); 68 80 void addSortKey(const string &name);
Note:
See TracChangeset
for help on using the changeset viewer.