0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
This commit is contained in:
dwight 2010-12-27 15:17:50 -05:00
parent de3be2307d
commit d38d0a7ab6

View File

@ -36,14 +36,19 @@ namespace mongo {
class StringSplitter {
public:
/** @param big the string to be split
@param splitter the delimiter
*/
StringSplitter( const char * big , const char * splitter )
: _big( big ) , _splitter( splitter ){
}
/** @return true if more to be taken via next() */
bool more(){
return _big[0];
}
/** get next split string fragment */
string next(){
const char * foo = strstr( _big , _splitter );
if ( foo ){