
#ifndef __WFX_UTIL_STRINGUTILS_H__
#define __WFX_UTIL_STRINGUTILS_H__

#include <WFX/WFXIncludes.h>
#include <WFX/math/Vector3.h>

namespace WFX {

    namespace util {
    
        /**
         * collection of string utils
         */
        class StringUtils {
            public:

                /**
                 * splits the string at the given delimiter
                 * returns a std::vector of tokens
                 */
                static std::vector<std::string> tokenize(std::string str, std::string del);

                /** converts a string to a Real */
                static Real toReal(std::string str);
                
                /** converts a string to an Int */
                static Int toInt(std::string str);
                
                /** converts a string to an UInt */
                static UInt toUInt(std::string str);

                /** 
                 * parses a string of comma or whitespace separated ints into
                 * a std::vector<Int>
                 */
                static void parseIntV(const std::string& s, std::vector<Int>& v);
                
                /** 
                 * parses a string of comma or whitespace separated Reals into
                 * a std::vector<Real>
                 */
                static void parseRealV(const std::string& s, std::vector<Real>& v);
                
                /**
                 * parses a string of Reals into a std::vector<Vector3>
                 */
                static void parseVector3V(const std::string& s, std::vector<WFX::math::Vector3>& v);
                /** 
                 * parses a string of comma separated vectors into
                 * a std::vector<Vector3>
                 */
                static void parseCSVVector3V(const std::string& s, std::vector<WFX::math::Vector3>& v);
                
            protected:
            private:
        };

    }
   
}


#endif //include guard

