Definition at line 28 of file StringList.h. 00029 { 00030 String element = ""; 00031 for (String::const_iterator p = s.begin() ; p != s.end() ; p++) 00032 { 00033 if (*p == separator) 00034 { 00035 if (!element.empty() || includeEmptyStrings) 00036 { 00037 push_back(element); 00038 element = ""; 00039 } 00040 } 00041 else 00042 { 00043 element += *p; 00044 } 00045 } 00046 if (!element.empty()) 00047 push_back(element); 00048 if (size() == 0) // in case the empty string is passed 00049 push_back(""); 00050 }
|