source:
orxonox.OLD/orxonox/trunk/src/lib/util/substring.h
@
5030
Last change on this file since 5030 was 4833, checked in by bensch, 19 years ago | |
---|---|
File size: 649 bytes |
Rev | Line | |
---|---|---|
[4597] | 1 | /*! |
[4220] | 2 | \file substring.h |
3 | \brief a small class to get the parts of a string separated by commas | |
4 | */ | |
[3941] | 5 | |
6 | #ifndef _SUBSTRING_H | |
7 | #define _SUBSTRING_H | |
[4220] | 8 | |
[4482] | 9 | //! A class that can load one string and split it in multipe ones |
[3941] | 10 | class SubString |
11 | { | |
[4220] | 12 | public: |
[4734] | 13 | SubString(const char* string, char splitter = ','); |
[4220] | 14 | ~SubString(); |
[4597] | 15 | |
[4830] | 16 | inline int getCount() { return this->splittersCount; }; |
[4220] | 17 | const char* getString( int i); |
[4597] | 18 | |
[4833] | 19 | void debug() const; |
20 | ||
[4220] | 21 | private: |
[4830] | 22 | char** strings; //!< strings produced from a single string splitted in multiple strings |
23 | int splittersCount; //!< how many splitted parts | |
[3941] | 24 | }; |
25 | ||
26 | #endif /* _SUBSTRING_H */ |
Note: See TracBrowser
for help on using the repository browser.