Changeset 7323 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- Apr 17, 2006, 1:52:22 PM (19 years ago)
- Location:
- trunk/src/lib/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/substring.cc
r7321 r7323 31 31 #include <cassert> 32 32 33 34 /** 35 * @brief default constructor 36 */ 37 SubString::SubString() 38 { 39 } 40 41 33 42 /** 34 43 * @brief create a SubString from … … 62 71 * @param comment_char the Comment character. 63 72 */ 64 SubString::SubString(const std::string& string, const std::string& splitters, char escapeChar, char safemode_char, char comment_char)73 SubString::SubString(const std::string& string, const std::string& splitters, char escapeChar, char safemode_char, char comment_char) 65 74 { 66 75 SubString::splitLine(this->strings, string, splitters, escapeChar, safemode_char, comment_char); … … 133 142 SubString SubString::operator+(const SubString& subString) const 134 143 { 135 return SubString( subString) += subString;144 return SubString(*this) += subString; 136 145 } 137 146 … … 146 155 for (unsigned int i = 0; i < subString.size(); i++) 147 156 this->strings.push_back(subString[i]); 157 return *this; 148 158 } 149 159 … … 190 200 { 191 201 this->strings.clear(); 192 SubString::splitLine(this->strings, string, splitters, escapeChar, safemode_char );193 return strings.size();202 SubString::splitLine(this->strings, string, splitters, escapeChar, safemode_char, comment_char); 203 return this->strings.size(); 194 204 } 195 205 -
trunk/src/lib/util/substring.h
r7320 r7323 26 26 { 27 27 public: 28 SubString(const std::string& string = "", char splitter = ','); 28 SubString(); 29 SubString(const std::string& string, char splitter = ','); 29 30 SubString(const std::string& string, bool whiteSpaces); 30 31 SubString(const std::string& string, const std::string& splitters, char escapeChar ='\\', char safemode_char = '"', char comment_char = '\0');
Note: See TracChangeset
for help on using the changeset viewer.