00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 #ifndef __StringUtils_h__ 00030 #define __StringUtils_h__ 00031 00032 #include <string> 00033 #include <QByteArray> 00034 #include "GBufferString.h" 00035 00037 00041 00042 class StringTokenizer 00043 { 00044 public: 00045 00046 StringTokenizer( const std::string &strToken, const std::string &strDelimiter ); 00047 StringTokenizer( const char *strToken, const char *strDelimiter ); 00048 00049 ~StringTokenizer(); 00050 00052 bool nextToken( std::string &strText ); 00053 bool nextToken( QByteArray &strText ); 00054 bool nextToken( GBufferString &strText ); 00055 00056 private: 00057 00058 bool mFirst; 00059 char *mcstr; 00060 char *mdelim; 00061 }; 00062 00063 #endif // __StringUtils_h__ 00064