Learning boost 3 -- string algorithm 1[3]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 heroboy2000 的 blog

*/

    

std::string str4;

    

 

boost::to_upper_copy(std::back_inserter(str4),

                    std::make_pair(str2.begin(), str2.end())

                    );//使用迭代器的copy algorithm, str4==”hello”

                      //这里注意,这里和stl不同的是输出迭代器在输入迭代器的前面

boost::to_upper_copy(std::back_inserter(str4), "hello");str4==”hellohello”

//这也是可以的,前面说过了iteratorrange相当于一个容器,

//stl标准容器,std::basic_string char*都可以作为string_algorithm中的容器

本文关键:Learning boost 3 -- string algorithm 1
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top