blob: 31fe99d638853d2c5780b604a8ac3ecb4eeaa964 (
plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter 2. Boost String Algorithms Library</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="boost/numeric/functional/as_one_T__std_idp439734464.html" title="Struct template as_one<T, std_vector_tag>">
<link rel="next" href="string_algo/release_notes.html" title="Release Notes">
</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/numeric/functional/as_one_T__std_idp439734464.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="string_algo/release_notes.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="string_algo"></a>Chapter 2. Boost String Algorithms Library</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Pavol</span> <span class="surname">Droba</span>
</h3></div></div>
<div><p class="copyright">Copyright © 2002-2004 Pavol Droba</p></div>
<div><div class="legalnotice">
<a name="idp106503584"></a><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></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="string_algo.html#string_algo.intro">Introduction</a></span></dt>
<dt><span class="section"><a href="string_algo/release_notes.html">Release Notes</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html">Usage</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="string_algo/usage.html#idp106541856">First Example</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html#idp106564528">Case conversion</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html#idp106571840">Predicates and Classification</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html#idp106582112">Trimming</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html#idp106589088">Find algorithms</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html#idp106602240">Replace Algorithms</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html#idp106615600">Find Iterator</a></span></dt>
<dt><span class="section"><a href="string_algo/usage.html#idp106626864">Split</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="string_algo/quickref.html">Quick Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="string_algo/quickref.html#idp106643680">Algorithms</a></span></dt>
<dt><span class="section"><a href="string_algo/quickref.html#idp106884496">Finders and Formatters</a></span></dt>
<dt><span class="section"><a href="string_algo/quickref.html#idp106929360">Iterators</a></span></dt>
<dt><span class="section"><a href="string_algo/quickref.html#idp106940048">Classification</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="string_algo/design.html">Design Topics</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="string_algo/design.html#string_algo.string">String Representation</a></span></dt>
<dt><span class="section"><a href="string_algo/design.html#string_algo.sequence_traits">Sequence Traits</a></span></dt>
<dt><span class="section"><a href="string_algo/design.html#string_algo.find">Find Algorithms</a></span></dt>
<dt><span class="section"><a href="string_algo/design.html#string_algo.replace">Replace Algorithms</a></span></dt>
<dt><span class="section"><a href="string_algo/design.html#string_algo.split">Find Iterators & Split Algorithms</a></span></dt>
<dt><span class="section"><a href="string_algo/design.html#string_algo.exception">Exception Safety</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="string_algo/concept.html">Concepts</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="string_algo/concept.html#idp107053984">Definitions</a></span></dt>
<dt><span class="section"><a href="string_algo/concept.html#string_algo.finder_concept">Finder Concept</a></span></dt>
<dt><span class="section"><a href="string_algo/concept.html#string_algo.formatter_concept">Formatter concept</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="string_algo/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string_hpp">Header <boost/algorithm/string.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.case_conv_hpp">Header <boost/algorithm/string/case_conv.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.classification_hpp">Header <boost/algorithm/string/classification.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.compare_hpp">Header <boost/algorithm/string/compare.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.concept_hpp">Header <boost/algorithm/string/concept.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.constants_hpp">Header <boost/algorithm/string/constants.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.erase_hpp">Header <boost/algorithm/string/erase.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.find_hpp">Header <boost/algorithm/string/find.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.find_format_hpp">Header <boost/algorithm/string/find_format.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp">Header <boost/algorithm/string/find_iterator.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.finder_hpp">Header <boost/algorithm/string/finder.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.formatter_hpp">Header <boost/algorithm/string/formatter.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.iter_find_hpp">Header <boost/algorithm/string/iter_find.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.join_hpp">Header <boost/algorithm/string/join.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.predicate_hpp">Header <boost/algorithm/string/predicate.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.regex_hpp">Header <boost/algorithm/string/regex.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.regex_find_format_hpp">Header <boost/algorithm/string/regex_find_format.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.replace_hpp">Header <boost/algorithm/string/replace.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.sequence_traits_hpp">Header <boost/algorithm/string/sequence_traits.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.split_hpp">Header <boost/algorithm/string/split.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.std_containers_traits_hpp">Header <boost/algorithm/string/std_containers_traits.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.trim_hpp">Header <boost/algorithm/string/trim.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.trim_all_hpp">Header <boost/algorithm/string/trim_all.hpp></a></span></dt>
<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string_regex_hpp">Header <boost/algorithm/string_regex.hpp></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="string_algo/rationale.html">Rationale</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="string_algo/rationale.html#idp115651120">Locales</a></span></dt>
<dt><span class="section"><a href="string_algo/rationale.html#string_algo.regex">Regular Expressions</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="string_algo/env.html">Environment</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="string_algo/env.html#idp115662224">Build</a></span></dt>
<dt><span class="section"><a href="string_algo/env.html#idp115664992">Examples</a></span></dt>
<dt><span class="section"><a href="string_algo/env.html#idp115666576">Tests</a></span></dt>
<dt><span class="section"><a href="string_algo/env.html#idp115668080">Portability</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="string_algo/credits.html">Credits</a></span></dt>
<dd><dl><dt><span class="section"><a href="string_algo/credits.html#string_algo.ack">Acknowledgments</a></span></dt></dl></dd>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="string_algo.intro"></a>Introduction</h2></div></div></div>
<p>
The String Algorithm Library provides a generic implementation of
string-related algorithms which are missing in STL. It is an extension
to the algorithms library of STL and it includes trimming, case conversion,
predicates and find/replace functions. All of them come in different variants
so it is easier to choose the best fit for a particular need.
</p>
<p>
The implementation is not restricted to work with a particular container
(like <code class="computeroutput">std::basic_string</code>), rather it is as generic as
possible. This generalization is not compromising the performance since
algorithms are using container specific features when it means a performance
gain.
</p>
<p>
<span class="bold"><strong>
Important note: In this documentation we use term <span class="emphasis"><em>string</em></span> to
designate a sequence of <span class="emphasis"><em>characters</em></span> stored in an arbitrary container.
A <span class="emphasis"><em>string</em></span> is not restricted to <code class="computeroutput">std::basic_string</code> and
<span class="emphasis"><em>character</em></span> does not have to be <code class="computeroutput">char</code> or <code class="computeroutput">wchar_t</code>,
although these are most common candidates.
</strong></span>
Consult the <a class="link" href="string_algo/design.html" title="Design Topics">design chapter</a> to see precise specification of
supported string types.
</p>
<p>
The library interface functions and classes are defined in namespace <code class="computeroutput">boost::algorithm</code>, and
they are lifted into namespace <code class="computeroutput">boost</code> via using declaration.
</p>
<p>
The documentation is divided into several sections. For a quick start read the
<a class="link" href="string_algo/usage.html" title="Usage">Usage</a> section followed by
<a class="link" href="string_algo/quickref.html" title="Quick Reference">Quick Reference</a>.
<a class="link" href="string_algo/design.html" title="Design Topics">The Design Topics</a>,
<a class="link" href="string_algo/concept.html" title="Concepts">Concepts</a> and <a class="link" href="string_algo/rationale.html" title="Rationale">Rationale</a>
provide some explanation about the library design and structure an explain how it should be used.
See the <a class="link" href="string_algo/reference.html" title="Reference">Reference</a> for the complete list of provided utilities
and algorithms. Functions and classes in the reference are organized by the headers in which they are defined.
The reference contains links to the detailed description for every entity in the library.
</p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost/numeric/functional/as_one_T__std_idp439734464.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="string_algo/release_notes.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
|