9 vector<string> split( const string &line, char c, int limit = -1 ) {
10 string::size_type start = 0, end = 0;
13 while( 0 != limit-- && end != line.size() ) {
17 end = line.find( c, start );
18 if( end == string::npos ) {
22 out.push_back( line.substr( start, end-start ) );
32 for( int c = cin.get(); 0 != c && ! cin.eof(); c = cin.get() ) {
33 file_string.push_back( c );
35 if( 0 != file_string.size() ) {
37 // type perms user group size datemodified name (7 total)
38 // f 0600 cnb cnb 424 20051015205340 ./.git/index
39 vector<string> values = split( file_string, ' ', 7 );
41 } while( ! cin.eof() );