I am very new to C++. I am trying to figure out this sample short hand for loop from my book, it is very long and ugly and was wondering if this can be re written in a cleaner way. Ignore the functions in there like before() and others, they are part of a linked list program I am working on. I just do not understand from my book how to re write the loop in a more "traditional" way. Thanks in advance!
fooExample(string str){
string s = toLower(str);
for(books->setEnd();!books->atStart() && (toLower(books->getInfo().getAuthor()).search(s)==string::npos);books->before());
}