2 #include "fieldsplit.hpp"
5 fieldsplitter::fieldsplitter(const std::string
& _line
) throw(std::bad_alloc
)
11 fieldsplitter::operator bool() throw()
13 return (position
< line
.length());
16 fieldsplitter::operator std::string() throw(std::bad_alloc
)
18 size_t nextp
, oldp
= position
;
19 nextp
= line
.find_first_of("|", position
);
20 if(nextp
> line
.length()) {
21 position
= line
.length();
22 return line
.substr(oldp
);
25 return line
.substr(oldp
, nextp
- oldp
);