• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Chapter 2. Boost String Algorithms Library</title>
6<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)">
10<link rel="prev" href="boost/numeric/functional/tag_s_1_3_2_6_4_5_1_1_1_10.html" title="Struct template tag&lt;std::vector&lt; T, Al &gt;&gt;">
11<link rel="next" href="string_algo/release_notes.html" title="Release Notes">
12</head>
13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14<table cellpadding="2" width="100%"><tr>
15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
16<td align="center"><a href="../../index.html">Home</a></td>
17<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20<td align="center"><a href="../../more/index.htm">More</a></td>
21</tr></table>
22<hr>
23<div class="spirit-nav">
24<a accesskey="p" href="boost/numeric/functional/tag_s_1_3_2_6_4_5_1_1_1_10.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>
25</div>
26<div class="chapter">
27<div class="titlepage"><div>
28<div><h2 class="title">
29<a name="string_algo"></a>Chapter 2. Boost String Algorithms Library</h2></div>
30<div><div class="author"><h3 class="author">
31<span class="firstname">Pavol</span> <span class="surname">Droba</span>
32</h3></div></div>
33<div><p class="copyright">Copyright © 2002-2004 Pavol Droba</p></div>
34<div><div class="legalnotice">
35<a name="id-1.3.3.1.3"></a><p>Use, modification and distribution is subject to the Boost
36                Software License, Version 1.0. (See accompanying file
37                <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>)
38            </p>
39</div></div>
40</div></div>
41<div class="toc">
42<p><b>Table of Contents</b></p>
43<dl class="toc">
44<dt><span class="section"><a href="string_algo.html#string_algo.intro">Introduction</a></span></dt>
45<dt><span class="section"><a href="string_algo/release_notes.html">Release Notes</a></span></dt>
46<dt><span class="section"><a href="string_algo/usage.html">Usage</a></span></dt>
47<dd><dl>
48<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.2">First Example</a></span></dt>
49<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.3">Case conversion</a></span></dt>
50<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.4">Predicates and Classification</a></span></dt>
51<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.5">Trimming</a></span></dt>
52<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.6">Find algorithms</a></span></dt>
53<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.7">Replace Algorithms</a></span></dt>
54<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.8">Find Iterator</a></span></dt>
55<dt><span class="section"><a href="string_algo/usage.html#id-1.3.3.5.9">Split</a></span></dt>
56</dl></dd>
57<dt><span class="section"><a href="string_algo/quickref.html">Quick Reference</a></span></dt>
58<dd><dl>
59<dt><span class="section"><a href="string_algo/quickref.html#id-1.3.3.6.2">Algorithms</a></span></dt>
60<dt><span class="section"><a href="string_algo/quickref.html#id-1.3.3.6.3">Finders and Formatters</a></span></dt>
61<dt><span class="section"><a href="string_algo/quickref.html#id-1.3.3.6.4">Iterators</a></span></dt>
62<dt><span class="section"><a href="string_algo/quickref.html#id-1.3.3.6.5">Classification</a></span></dt>
63</dl></dd>
64<dt><span class="section"><a href="string_algo/design.html">Design Topics</a></span></dt>
65<dd><dl>
66<dt><span class="section"><a href="string_algo/design.html#string_algo.string">String Representation</a></span></dt>
67<dt><span class="section"><a href="string_algo/design.html#string_algo.sequence_traits">Sequence Traits</a></span></dt>
68<dt><span class="section"><a href="string_algo/design.html#string_algo.find">Find Algorithms</a></span></dt>
69<dt><span class="section"><a href="string_algo/design.html#string_algo.replace">Replace Algorithms</a></span></dt>
70<dt><span class="section"><a href="string_algo/design.html#string_algo.split">Find Iterators &amp; Split Algorithms</a></span></dt>
71<dt><span class="section"><a href="string_algo/design.html#string_algo.exception">Exception Safety</a></span></dt>
72</dl></dd>
73<dt><span class="section"><a href="string_algo/concept.html">Concepts</a></span></dt>
74<dd><dl>
75<dt><span class="section"><a href="string_algo/concept.html#id-1.3.3.8.2">Definitions</a></span></dt>
76<dt><span class="section"><a href="string_algo/concept.html#string_algo.finder_concept">Finder Concept</a></span></dt>
77<dt><span class="section"><a href="string_algo/concept.html#string_algo.formatter_concept">Formatter concept</a></span></dt>
78</dl></dd>
79<dt><span class="section"><a href="string_algo/reference.html">Reference</a></span></dt>
80<dd><dl>
81<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string_hpp">Header &lt;boost/algorithm/string.hpp&gt;</a></span></dt>
82<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.case_conv_hpp">Header &lt;boost/algorithm/string/case_conv.hpp&gt;</a></span></dt>
83<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.classification_hpp">Header &lt;boost/algorithm/string/classification.hpp&gt;</a></span></dt>
84<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.compare_hpp">Header &lt;boost/algorithm/string/compare.hpp&gt;</a></span></dt>
85<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.concept_hpp">Header &lt;boost/algorithm/string/concept.hpp&gt;</a></span></dt>
86<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.constants_hpp">Header &lt;boost/algorithm/string/constants.hpp&gt;</a></span></dt>
87<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.erase_hpp">Header &lt;boost/algorithm/string/erase.hpp&gt;</a></span></dt>
88<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.find_hpp">Header &lt;boost/algorithm/string/find.hpp&gt;</a></span></dt>
89<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.find_format_hpp">Header &lt;boost/algorithm/string/find_format.hpp&gt;</a></span></dt>
90<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp">Header &lt;boost/algorithm/string/find_iterator.hpp&gt;</a></span></dt>
91<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.finder_hpp">Header &lt;boost/algorithm/string/finder.hpp&gt;</a></span></dt>
92<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.formatter_hpp">Header &lt;boost/algorithm/string/formatter.hpp&gt;</a></span></dt>
93<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.iter_find_hpp">Header &lt;boost/algorithm/string/iter_find.hpp&gt;</a></span></dt>
94<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.join_hpp">Header &lt;boost/algorithm/string/join.hpp&gt;</a></span></dt>
95<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.predicate_hpp">Header &lt;boost/algorithm/string/predicate.hpp&gt;</a></span></dt>
96<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.regex_hpp">Header &lt;boost/algorithm/string/regex.hpp&gt;</a></span></dt>
97<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.regex_find_format_hpp">Header &lt;boost/algorithm/string/regex_find_format.hpp&gt;</a></span></dt>
98<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.replace_hpp">Header &lt;boost/algorithm/string/replace.hpp&gt;</a></span></dt>
99<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.sequence_traits_hpp">Header &lt;boost/algorithm/string/sequence_traits.hpp&gt;</a></span></dt>
100<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.split_hpp">Header &lt;boost/algorithm/string/split.hpp&gt;</a></span></dt>
101<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.std_containers_traits_hpp">Header &lt;boost/algorithm/string/std_containers_traits.hpp&gt;</a></span></dt>
102<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.trim_hpp">Header &lt;boost/algorithm/string/trim.hpp&gt;</a></span></dt>
103<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string.trim_all_hpp">Header &lt;boost/algorithm/string/trim_all.hpp&gt;</a></span></dt>
104<dt><span class="section"><a href="string_algo/reference.html#header.boost.algorithm.string_regex_hpp">Header &lt;boost/algorithm/string_regex.hpp&gt;</a></span></dt>
105</dl></dd>
106<dt><span class="section"><a href="string_algo/rationale.html">Rationale</a></span></dt>
107<dd><dl>
108<dt><span class="section"><a href="string_algo/rationale.html#id-1.3.3.10.2">Locales</a></span></dt>
109<dt><span class="section"><a href="string_algo/rationale.html#string_algo.regex">Regular Expressions</a></span></dt>
110</dl></dd>
111<dt><span class="section"><a href="string_algo/env.html">Environment</a></span></dt>
112<dd><dl>
113<dt><span class="section"><a href="string_algo/env.html#id-1.3.3.11.2">Build</a></span></dt>
114<dt><span class="section"><a href="string_algo/env.html#id-1.3.3.11.3">Examples</a></span></dt>
115<dt><span class="section"><a href="string_algo/env.html#id-1.3.3.11.4">Tests</a></span></dt>
116<dt><span class="section"><a href="string_algo/env.html#id-1.3.3.11.5">Portability</a></span></dt>
117</dl></dd>
118<dt><span class="section"><a href="string_algo/credits.html">Credits</a></span></dt>
119<dd><dl><dt><span class="section"><a href="string_algo/credits.html#string_algo.ack">Acknowledgments</a></span></dt></dl></dd>
120</dl>
121</div>
122<div class="section">
123<div class="titlepage"><div><div><h2 class="title" style="clear: both">
124<a name="string_algo.intro"></a>Introduction</h2></div></div></div>
125<p>
126        The String Algorithm Library provides a generic implementation of
127        string-related algorithms which are missing in STL. It is an extension
128        to the algorithms library of STL and it includes trimming, case conversion,
129        predicates and find/replace functions. All of them come in different variants
130        so it is easier to choose the best fit for a particular need.
131    </p>
132<p>
133        The implementation is not restricted to work with a particular container
134        (like <code class="computeroutput">std::basic_string</code>), rather it is as generic as
135        possible. This generalization is not compromising the performance since
136        algorithms are using container specific features when it means a performance
137        gain.
138    </p>
139<p>
140        <span class="bold"><strong>
141            Important note: In this documentation we use term <span class="emphasis"><em>string</em></span> to
142            designate a sequence of <span class="emphasis"><em>characters</em></span> stored in an arbitrary container.
143            A <span class="emphasis"><em>string</em></span> is not restricted to <code class="computeroutput">std::basic_string</code> and
144            <span class="emphasis"><em>character</em></span> does not have to be <code class="computeroutput">char</code> or <code class="computeroutput">wchar_t</code>,
145            although these are most common candidates.
146        </strong></span>
147        Consult the <a class="link" href="string_algo/design.html" title="Design Topics">design chapter</a> to see precise specification of
148        supported string types.
149    </p>
150<p>
151        The library interface functions and classes are defined in namespace <code class="computeroutput">boost::algorithm</code>, and
152        they are lifted into namespace <code class="computeroutput">boost</code> via using declaration.
153    </p>
154<p>
155        The documentation is divided into several sections. For a quick start read the
156        <a class="link" href="string_algo/usage.html" title="Usage">Usage</a> section followed by
157        <a class="link" href="string_algo/quickref.html" title="Quick Reference">Quick Reference</a>.
158        <a class="link" href="string_algo/design.html" title="Design Topics">The Design Topics</a>,
159        <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>
160        provide some explanation about the library design and structure an explain how it should be used.
161        See the <a class="link" href="string_algo/reference.html" title="Reference">Reference</a> for the complete list of provided utilities
162        and algorithms. Functions and classes in the reference are organized by the headers in which they are defined.
163        The reference contains links to the detailed description for every entity in the library.
164    </p>
165</div>
166</div>
167<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
168<td align="left"></td>
169<td align="right"><div class="copyright-footer"></div></td>
170</tr></table>
171<hr>
172<div class="spirit-nav">
173<a accesskey="p" href="boost/numeric/functional/tag_s_1_3_2_6_4_5_1_1_1_10.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>
174</div>
175</body>
176</html>
177