File: rationale.html

package info (click to toggle)
boost1.42 1.42.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 277,864 kB
  • ctags: 401,076
  • sloc: cpp: 1,235,659; xml: 74,142; ansic: 41,313; python: 26,756; sh: 11,840; cs: 2,118; makefile: 655; perl: 494; yacc: 456; asm: 353; csh: 6
file content (82 lines) | stat: -rwxr-xr-x 5,459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Rationale</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../string_algo.html" title="Chapter&#160;20.&#160;Boost String Algorithms Library">
<link rel="prev" href="../boost/algorithm/trim.html" title="Function template trim">
<link rel="next" href="env.html" title="Environment">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/algorithm/trim.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../string_algo.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="env.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Rationale">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="string_algo.rationale"></a>Rationale</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="rationale.html#id1757079">Locales</a></span></dt>
<dt><span class="section"><a href="rationale.html#string_algo.regex">Regular Expressions</a></span></dt>
</dl></div>
<div class="section" title="Locales">
<div class="titlepage"><div><div><h3 class="title">
<a name="id1757079"></a>Locales</h3></div></div></div>
<p>
            Locales have a very close relation to string processing. They contain information about
            the character sets and are used, for example, to change the case of characters and 
            to classify the characters. 
        </p>
<p>
            C++ allows to work with multiple different instances of locales at once. If an algorithm
            manipulates some data in a way that requires the usage of locales, there must be a way
            to specify them. However, one instance of locales is sufficient for most of the applications,
            and for a user it could be very tedious to specify which locales to use at every place 
            where it is needed. 
        </p>
<p>
            Fortunately, the C++ standard allows to specify the <span class="emphasis"><em>global</em></span> locales (using static member
            function <code class="computeroutput">std:locale::global()</code>). When instantiating an
            <code class="computeroutput">std::locale</code> class without explicit information, the instance will 
            be initialized with the <span class="emphasis"><em>global</em></span> locale. This implies, that if an algorithm needs a locale,
            it should have an <code class="computeroutput">std::locale</code> parameter defaulting to  <code class="computeroutput">std::locale()</code>.
            If a user needs to specify locales explicitly, she can do so. Otherwise the <span class="emphasis"><em>global</em></span>
            locales are used.
        </p>
</div>
<div class="section" title="Regular Expressions">
<div class="titlepage"><div><div><h3 class="title">
<a name="string_algo.regex"></a>Regular Expressions</h3></div></div></div>
<p>
            Regular expressions are an essential part of text processing. For this reason, the library 
            also provides regex variants of some algorithms. The library does not attempt to replace
            Boost.Regex; it merely wraps its functionality in a new interface.
            As a part of this library, regex algorithms integrate smoothly with other components, which 
            brings additional value.
        </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: February 27, 2008 at 20:00:24 +0000</small></p></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2002-2004 Pavol Droba<p>Use, modification and distribution is subject to the Boost
                Software License, Version 1.0. (See accompanying file
                <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
            </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/algorithm/trim.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../string_algo.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="env.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>