Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/util/substring.h @ 5190

Last change on this file since 5190 was 5183, checked in by bensch, 20 years ago

orxonox/trunk: SubString now also can split by whiteSpaces :>
this cost me almost 2 hours… sometimes i think, that i am unable to think…. :/
other times it just works, like when learning some Information Transfer

File size: 727 bytes
Line 
1/*!
2  \file substring.h
3  \brief a small class to get the parts of a string separated by commas
4*/
5
6#ifndef _SUBSTRING_H
7#define _SUBSTRING_H
8
9//! A class that can load one string and split it in multipe ones
10class SubString
11{
12 public:
13  SubString(const char* string, char splitter = ',');
14  SubString(const char* string, bool whiteSpaces);
15  ~SubString();
16
17  inline unsigned int getCount() { return this->splittersCount; };
18  const char* getString(unsigned int i);
19
20  void debug() const;
21
22 private:
23  char**          strings;                      //!< strings produced from a single string splitted in multiple strings
24  unsigned int    splittersCount;               //!< how many splitted parts
25};
26
27#endif /* _SUBSTRING_H */
Note: See TracBrowser for help on using the repository browser.