ultimatepp/uppdev/bigmailer/csvImport.h
cxl 351994a6cc Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

28 lines
555 B
C++

#ifndef _csvImport_h_
#define _csvImport_h_
struct csvResult
{
Vector<String> fields ;
Vector< Vector<String> > values ;
bool ImportFrom( const String& filePath ) ;
} ;
// CSVParser inspirated in code from other people ......
class CSVParser {
private:
String sData;
int nPos;
String GetNext();
int separator ;
public:
CSVParser();
void SetSeparator(int sep ) { separator = sep ; }
Vector<String> ParseLine(const String &sIn);
Vector<String> ParseLine(const String &sIn, int fieldCount );
};
#endif