]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/algorithm/string/example/conv_example.cpp
1 // Boost string_algo library example file ---------------------------------//
3 // Copyright Pavol Droba 2002-2003. Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // See http://www.boost.org for updates, documentation, and revision history.
14 #include <boost/algorithm/string/case_conv.hpp>
17 using namespace boost
;
21 cout
<< "* Case Conversion Example *" << endl
<< endl
;
23 string
str1("AbCdEfG");
24 vector
<char> vec1( str1
.begin(), str1
.end() );
26 // Convert vector of chars to lower case
27 cout
<< "lower-cased copy of vec1: ";
28 to_lower_copy( ostream_iterator
<char>(cout
), vec1
);
31 // Conver string str1 to upper case ( copy the input )
32 cout
<< "upper-cased copy of str1: " << to_upper_copy( str1
) << endl
;
36 cout
<< "lower-cased str1: " << str1
<< endl
;