C++/0x02-boost13 boost find boost find 1.소스 #include #include using namespace std; using namespace boost; int main( int argc , char ** argv ) { char text[] = "hello black falcon ab"; iterator_range result = find_last( text , "ab"); transform( result.begin() , result.end() , result.begin() , bind2nd( plus() , 1 ) ); cout 2016. 8. 1. boost trimming boost trimming 1.소스 #include #include using namespace std; using namespace boost; int main( int argc , char ** argv ) { string str1 = " hello world! "; cout 2016. 8. 1. boost helloworld boost helloworld 1.소스 #include #include using namespace std; using namespace boost; int main( int argc , char ** argv ) { string str1(" hello world! "); to_upper(str1); // str1 == " HELLO WORLD! " trim(str1); // str1 == "HELLO WORLD!" cout 2016. 8. 1. boost example2 boost example2 1.소스 #include #include #include int main( int argc , char ** argv ) { std::string line; boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" ); while (std::cin) { std::getline(std::cin, line); boost::smatch matches; if (boost::regex_match(line, matches, pat)) std::cout 2016. 8. 1. 이전 1 2 3 4 다음