Changeset 7214 in orxonox.OLD for branches/std/src/lib/util/substring.h
- Timestamp:
- Mar 10, 2006, 7:18:03 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/util/substring.h
r7212 r7214 35 35 36 36 inline unsigned int getCount() { return this->strings.size(); }; 37 const std::string& getString(unsigned int i) { return this->strings[i]; };37 const std::string& getString(unsigned int i) { return (i < this->strings.size()) ? this->strings[i] : emptyString; }; 38 38 unsigned int getOffset(unsigned int i); 39 39 … … 48 48 std::vector<std::string> strings; //!< strings produced from a single string splitted in multiple strings 49 49 std::vector<unsigned int> offsets; //!< offsets of the beginning of the input-string to the beginning of each substring. 50 51 static const std::string emptyString; 50 52 }; 51 53
Note: See TracChangeset
for help on using the changeset viewer.