[12] | 1 | <html> |
---|
| 2 | <head> |
---|
| 3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
| 4 | <title>Chapter 11. Boost String Algorithms Library</title> |
---|
| 5 | <link rel="stylesheet" href="boostbook.css" type="text/css"> |
---|
| 6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
| 7 | <link rel="start" href="index.html" title="The Boost C++ Libraries"> |
---|
| 8 | <link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries"> |
---|
| 9 | <link rel="prev" href="boost_staticassert/test.html" title=" Test Programs"> |
---|
| 10 | <link rel="next" href="string_algo/release_notes.html" title="Release Notes"> |
---|
| 11 | </head> |
---|
| 12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
| 13 | <table cellpadding="2" width="100%"> |
---|
| 14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td> |
---|
| 15 | <td align="center"><a href="../../index.htm">Home</a></td> |
---|
| 16 | <td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> |
---|
| 17 | <td align="center"><a href="../../people/people.htm">People</a></td> |
---|
| 18 | <td align="center"><a href="../../more/faq.htm">FAQ</a></td> |
---|
| 19 | <td align="center"><a href="../../more/index.htm">More</a></td> |
---|
| 20 | </table> |
---|
| 21 | <hr> |
---|
| 22 | <div class="spirit-nav"> |
---|
| 23 | <a accesskey="p" href="boost_staticassert/test.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="string_algo/release_notes.html"><img src="images/next.png" alt="Next"></a> |
---|
| 24 | </div> |
---|
| 25 | <div class="chapter" lang="en"> |
---|
| 26 | <div class="titlepage"><div> |
---|
| 27 | <div><h2 class="title"> |
---|
| 28 | <a name="string_algo"></a>Chapter 11. Boost String Algorithms Library</h2></div> |
---|
| 29 | <div><div class="author"><h3 class="author"> |
---|
| 30 | <span class="firstname">Pavol</span> <span class="surname">Droba</span> |
---|
| 31 | </h3></div></div> |
---|
| 32 | <div><p class="copyright">Copyright © 2002-2004 Pavol Droba</p></div> |
---|
| 33 | <div><div class="legalnotice"> |
---|
| 34 | <a name="id2742250"></a><p>Use, modification and distribution is subject to the Boost |
---|
| 35 | Software License, Version 1.0. (See accompanying file |
---|
| 36 | <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>) |
---|
| 37 | </p> |
---|
| 38 | </div></div> |
---|
| 39 | </div></div> |
---|
| 40 | <div class="toc"> |
---|
| 41 | <p><b>Table of Contents</b></p> |
---|
| 42 | <dl> |
---|
| 43 | <dt><span class="section"><a href="string_algo.html#string_algo.intro">Introduction</a></span></dt> |
---|
| 44 | <dt><span class="section"><a href="string_algo/release_notes.html">Release Notes</a></span></dt> |
---|
| 45 | <dt><span class="section"><a href="string_algo/usage.html">Usage</a></span></dt> |
---|
| 46 | <dd><dl> |
---|
| 47 | <dt><span class="section"><a href="string_algo/usage.html#id2742478">First Example</a></span></dt> |
---|
| 48 | <dt><span class="section"><a href="string_algo/usage.html#id2742674">Case conversion</a></span></dt> |
---|
| 49 | <dt><span class="section"><a href="string_algo/usage.html#id2742730">Predicates and Classification</a></span></dt> |
---|
| 50 | <dt><span class="section"><a href="string_algo/usage.html#id2742817">Trimming</a></span></dt> |
---|
| 51 | <dt><span class="section"><a href="string_algo/usage.html#id2742878">Find algorithms</a></span></dt> |
---|
| 52 | <dt><span class="section"><a href="string_algo/usage.html#id2742991">Replace Algorithms</a></span></dt> |
---|
| 53 | <dt><span class="section"><a href="string_algo/usage.html#id2743115">Find Iterator</a></span></dt> |
---|
| 54 | <dt><span class="section"><a href="string_algo/usage.html#id2743220">Split</a></span></dt> |
---|
| 55 | </dl></dd> |
---|
| 56 | <dt><span class="section"><a href="string_algo/quickref.html">Quick Reference</a></span></dt> |
---|
| 57 | <dd><dl> |
---|
| 58 | <dt><span class="section"><a href="string_algo/quickref.html#id2743361">Algorithms</a></span></dt> |
---|
| 59 | <dt><span class="section"><a href="string_algo/quickref.html#id2744766">Finders and Formatters</a></span></dt> |
---|
| 60 | <dt><span class="section"><a href="string_algo/quickref.html#id2745026">Iterators</a></span></dt> |
---|
| 61 | <dt><span class="section"><a href="string_algo/quickref.html#id2745083">Classification</a></span></dt> |
---|
| 62 | </dl></dd> |
---|
| 63 | <dt><span class="section"><a href="string_algo/design.html">Design Topics</a></span></dt> |
---|
| 64 | <dd><dl> |
---|
| 65 | <dt><span class="section"><a href="string_algo/design.html#string_algo.string">String Representation</a></span></dt> |
---|
| 66 | <dt><span class="section"><a href="string_algo/design.html#string_algo.sequence_traits">Sequence Traits</a></span></dt> |
---|
| 67 | <dt><span class="section"><a href="string_algo/design.html#string_algo.find">Find Algorithms</a></span></dt> |
---|
| 68 | <dt><span class="section"><a href="string_algo/design.html#string_algo.replace">Replace Algorithms</a></span></dt> |
---|
| 69 | <dt><span class="section"><a href="string_algo/design.html#string_algo.split">Find Iterators & Split Algorithms</a></span></dt> |
---|
| 70 | <dt><span class="section"><a href="string_algo/design.html#string_algo.exception">Exception Safety</a></span></dt> |
---|
| 71 | </dl></dd> |
---|
| 72 | <dt><span class="section"><a href="string_algo/concept.html">Concepts</a></span></dt> |
---|
| 73 | <dd><dl> |
---|
| 74 | <dt><span class="section"><a href="string_algo/concept.html#id2745880">Definitions</a></span></dt> |
---|
| 75 | <dt><span class="section"><a href="string_algo/concept.html#string_algo.finder_concept">Finder Concept</a></span></dt> |
---|
| 76 | <dt><span class="section"><a href="string_algo/concept.html#string_algo.formatter_concept">Formatter concept</a></span></dt> |
---|
| 77 | </dl></dd> |
---|
| 78 | <dt><span class="section"><a href="string_algo/reference.html">Reference</a></span></dt> |
---|
| 79 | <dd><dl> |
---|
| 80 | <dt><span class="section"><a href="string_algo/reference.html#id2352615">Header <boost/algorithm/string/case_conv.hpp></a></span></dt> |
---|
| 81 | <dt><span class="section"><a href="string_algo/reference.html#id2336200">Header <boost/algorithm/string/classification.hpp></a></span></dt> |
---|
| 82 | <dt><span class="section"><a href="string_algo/reference.html#id2558715">Header <boost/algorithm/string/compare.hpp></a></span></dt> |
---|
| 83 | <dt><span class="section"><a href="string_algo/reference.html#id2353460">Header <boost/algorithm/string/concept.hpp></a></span></dt> |
---|
| 84 | <dt><span class="section"><a href="string_algo/reference.html#id2384198">Header <boost/algorithm/string/constants.hpp></a></span></dt> |
---|
| 85 | <dt><span class="section"><a href="string_algo/reference.html#id2571451">Header <boost/algorithm/string/erase.hpp></a></span></dt> |
---|
| 86 | <dt><span class="section"><a href="string_algo/reference.html#id2487443">Header <boost/algorithm/string/find.hpp></a></span></dt> |
---|
| 87 | <dt><span class="section"><a href="string_algo/reference.html#id2441187">Header <boost/algorithm/string/find_format.hpp></a></span></dt> |
---|
| 88 | <dt><span class="section"><a href="string_algo/reference.html#id2382464">Header <boost/algorithm/string/find_iterator.hpp></a></span></dt> |
---|
| 89 | <dt><span class="section"><a href="string_algo/reference.html#id2447201">Header <boost/algorithm/string/finder.hpp></a></span></dt> |
---|
| 90 | <dt><span class="section"><a href="string_algo/reference.html#id2356089">Header <boost/algorithm/string/formatter.hpp></a></span></dt> |
---|
| 91 | <dt><span class="section"><a href="string_algo/reference.html#id2589054">Header <boost/algorithm/string/predicate.hpp></a></span></dt> |
---|
| 92 | <dt><span class="section"><a href="string_algo/reference.html#id2556226">Header <boost/algorithm/string/regex.hpp></a></span></dt> |
---|
| 93 | <dt><span class="section"><a href="string_algo/reference.html#id2382044">Header <boost/algorithm/string/regex_find_format.hpp></a></span></dt> |
---|
| 94 | <dt><span class="section"><a href="string_algo/reference.html#id2553153">Header <boost/algorithm/string/replace.hpp></a></span></dt> |
---|
| 95 | <dt><span class="section"><a href="string_algo/reference.html#id2372677">Header <boost/algorithm/string/sequence_traits.hpp></a></span></dt> |
---|
| 96 | <dt><span class="section"><a href="string_algo/reference.html#id2541245">Header <boost/algorithm/string/split.hpp></a></span></dt> |
---|
| 97 | <dt><span class="section"><a href="string_algo/reference.html#id2552168">Header <boost/algorithm/string/std_containers_traits.hpp></a></span></dt> |
---|
| 98 | <dt><span class="section"><a href="string_algo/reference.html#id2552179">Header <boost/algorithm/string.hpp></a></span></dt> |
---|
| 99 | <dt><span class="section"><a href="string_algo/reference.html#id2573542">Header <boost/algorithm/string_regex.hpp></a></span></dt> |
---|
| 100 | <dt><span class="section"><a href="string_algo/reference.html#id2573553">Header <boost/algorithm/string/trim.hpp></a></span></dt> |
---|
| 101 | </dl></dd> |
---|
| 102 | <dt><span class="section"><a href="string_algo/rationale.html">Rationale</a></span></dt> |
---|
| 103 | <dd><dl> |
---|
| 104 | <dt><span class="section"><a href="string_algo/rationale.html#id2774637">Locales</a></span></dt> |
---|
| 105 | <dt><span class="section"><a href="string_algo/rationale.html#string_algo.regex">Regular Expressions</a></span></dt> |
---|
| 106 | </dl></dd> |
---|
| 107 | <dt><span class="section"><a href="string_algo/env.html">Environment</a></span></dt> |
---|
| 108 | <dd><dl> |
---|
| 109 | <dt><span class="section"><a href="string_algo/env.html#id2774731">Build</a></span></dt> |
---|
| 110 | <dt><span class="section"><a href="string_algo/env.html#id2774753">Examples</a></span></dt> |
---|
| 111 | <dt><span class="section"><a href="string_algo/env.html#id2774765">Tests</a></span></dt> |
---|
| 112 | <dt><span class="section"><a href="string_algo/env.html#id2774775">Portability</a></span></dt> |
---|
| 113 | </dl></dd> |
---|
| 114 | <dt><span class="section"><a href="string_algo/credits.html">Credits</a></span></dt> |
---|
| 115 | <dd><dl><dt><span class="section"><a href="string_algo/credits.html#string_algo.ack">Acknowledgments</a></span></dt></dl></dd> |
---|
| 116 | </dl> |
---|
| 117 | </div> |
---|
| 118 | <div class="section" lang="en"> |
---|
| 119 | <div class="titlepage"><div><div><h3 class="title"> |
---|
| 120 | <a name="string_algo.intro"></a>Introduction</h3></div></div></div> |
---|
| 121 | <p> |
---|
| 122 | The String Algorithm Library provides a generic implementation of |
---|
| 123 | string-related algorithms which are missing in STL. It is an extension |
---|
| 124 | to the algorithms library of STL and it includes trimming, case conversion, |
---|
| 125 | predicates and find/replace functions. All of them come in different variants |
---|
| 126 | so it is easier to choose the best fit for a particular need. |
---|
| 127 | </p> |
---|
| 128 | <p> |
---|
| 129 | The implementation is not restricted to work with a particular container |
---|
| 130 | (like <code class="computeroutput">std::basic_string</code>), rather it is as generic as |
---|
| 131 | possible. This generalization is not compromising the performance since |
---|
| 132 | algorithms are using container specific features when it means a performance |
---|
| 133 | gain. |
---|
| 134 | </p> |
---|
| 135 | <p><span class="bold"><strong> |
---|
| 136 | Important note: In this documentation we use term <span class="emphasis"><em>string</em></span> to |
---|
| 137 | designate a sequence of <span class="emphasis"><em>characters</em></span> stored in an arbitrary container. |
---|
| 138 | A <span class="emphasis"><em>string</em></span> is not restricted to <code class="computeroutput">std::basic_string</code> and |
---|
| 139 | <span class="emphasis"><em>character</em></span> does not have to be <code class="computeroutput">char</code> or <code class="computeroutput">wchar_t</code>, |
---|
| 140 | although these are most common candidates. |
---|
| 141 | </strong></span> |
---|
| 142 | Consult the <a href="string_algo/design.html" title="Design Topics">design chapter</a> to see precise specification of |
---|
| 143 | supported string types. |
---|
| 144 | </p> |
---|
| 145 | <p> |
---|
| 146 | The library interface functions and classes are defined in namespace <code class="computeroutput">boost::algorithm</code>, and |
---|
| 147 | they are lifted into namespace <code class="computeroutput">boost</code> via using declaration. |
---|
| 148 | </p> |
---|
| 149 | <p> |
---|
| 150 | The documentation is divided into several sections. For a quick start read the |
---|
| 151 | <a href="string_algo/usage.html" title="Usage">Usage</a> section followed by |
---|
| 152 | <a href="string_algo/quickref.html" title="Quick Reference">Quick Reference</a>. |
---|
| 153 | <a href="string_algo/design.html" title="Design Topics">The Design Topics</a>, |
---|
| 154 | <a href="string_algo/concept.html" title="Concepts">Concepts</a> and <a href="string_algo/rationale.html" title="Rationale">Rationale</a> |
---|
| 155 | provide some explanation about the library design and structure an explain how it should be used. |
---|
| 156 | See the <a href="string_algo/reference.html" title="Reference">Reference</a> for the complete list of provided utilities |
---|
| 157 | and algorithms. Functions and classes in the reference are organized by the headers in which they are defined. |
---|
| 158 | The reference contains links to the detailed description for every entity in the library. |
---|
| 159 | </p> |
---|
| 160 | </div> |
---|
| 161 | </div> |
---|
| 162 | <table width="100%"><tr> |
---|
| 163 | <td align="left"><small><p>Last revised: April 15, 2005 at 21:05:00 GMT</p></small></td> |
---|
| 164 | <td align="right"><small></small></td> |
---|
| 165 | </tr></table> |
---|
| 166 | <hr> |
---|
| 167 | <div class="spirit-nav"> |
---|
| 168 | <a accesskey="p" href="boost_staticassert/test.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="string_algo/release_notes.html"><img src="images/next.png" alt="Next"></a> |
---|
| 169 | </div> |
---|
| 170 | </body> |
---|
| 171 | </html> |
---|