src/biu/util/biu-string.cpp
Go to the documentation of this file.00001
00002 #include "biu/util/biu-string.h"
00003 #include <iostream>
00004
00005 namespace biu {
00006 namespace util {
00007
00008
00009
00010
00011
00012 bool findQueryString(std::string target, std::string query,std::ostream & out) {
00013 std::string::size_type loc=0;
00014 bool found=false;
00015
00016 while ( (loc=target.find( query, loc )) != std::string::npos ) {
00017 out <<"query: " <<query <<" found at " <<loc <<std::endl;
00018 found=true;
00019 loc++;
00020 }
00021
00022 if (!found) {
00023 out <<"query: " <<query <<" not found" <<std::endl;
00024 }
00025
00026 return found;
00027 }
00028
00029 }
00030 }