//
// StringTokenizer.h
// Qdos2 - Class for splitting string into tokens
//
// Janet Barnes
// March 2001
//

#ifndef QDOS_STRING_TOKENIZER_H_
#define QDOS_STRING_TOKENIZER_H_

#include <string>
#include <vector>

namespace QDOS{

class StringTokenizer
{
    public:
        StringTokenizer(char const *cp, char const *delimiters = " \t\n");
        ~StringTokenizer()
        { delete _subString; delete _str;}
       
        char *operator[](unsigned index);
        int get_n_tokens() const
        { return _n;}

    private:
        struct SubString
        {
            char *_str;
            int _length;
        };  

        char
            *_str;
        SubString
            *_subString;
        int _n;
};
} // end namespace QDOS

#endif 





