GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing codebrowser.dev — conv_example.cpp source code [boost/libs/algorithm/string/example/conv_example.cpp] - Codebrowser

Codebrowser logo
About
Contact
1// Boost string_algo library example file ---------------------------------//
2
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)
7
8// See http://www.boost.org for updates, documentation, and revision history.
9
10#include <string>
11#include <vector>
12#include <iostream>
13#include <iterator>
14#include <boost/algorithm/string/case_conv.hpp>
15
16using namespace std;
17using namespace boost;
18
19int main()
20{
21 cout << "* Case Conversion Example *" << endl << endl;
22
23 string str1("AbCdEfG");
24 vector<char> vec1( str1.begin(), str1.end() );
25
26 // Convert vector of chars to lower case
27 cout << "lower-cased copy of vec1: ";
28 to_lower_copy( Output: ostream_iterator<char>(cout), Input: vec1 );
29 cout << endl;
30
31 // Conver string str1 to upper case ( copy the input )
32 cout << "upper-cased copy of str1: " << to_upper_copy( Input: str1 ) << endl;
33
34 // Inplace conversion
35 to_lower( Input&: str1 );
36 cout << "lower-cased str1: " << str1 << endl;
37
38 cout << endl;
39
40 return 0;
41}
42

source code of boost/libs/algorithm/string/example/conv_example.cpp

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.