Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Chapter 18. Boost String Algorithms Library

Pavol Droba

Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

目錄

簡介
發佈注記
用法
第一個例子
大小寫轉換
判斷式與分類
修剪
查找算法
替換算法
查找迭代器
分割
快速參考
算法
Finders 和 Formatters
迭代器
分類
設計話題
string 表示法
序列特徵
查找算法
替換算法
查找迭代器 & 分割算法
異常安全
概念
定義
Finder 概念
Formatter 概念
參考
Header <boost/algorithm/string.hpp>
Header <boost/algorithm/string/case_conv.hpp>
Header <boost/algorithm/string/classification.hpp>
Header <boost/algorithm/string/compare.hpp>
Header <boost/algorithm/string/concept.hpp>
Header <boost/algorithm/string/constants.hpp>
Header <boost/algorithm/string/erase.hpp>
Header <boost/algorithm/string/find.hpp>
Header <boost/algorithm/string/find_format.hpp>
Header <boost/algorithm/string/find_iterator.hpp>
Header <boost/algorithm/string/finder.hpp>
Header <boost/algorithm/string/formatter.hpp>
Header <boost/algorithm/string/iter_find.hpp>
Header <boost/algorithm/string/join.hpp>
Header <boost/algorithm/string/predicate.hpp>
Header <boost/algorithm/string/regex.hpp>
Header <boost/algorithm/string/regex_find_format.hpp>
Header <boost/algorithm/string/replace.hpp>
Header <boost/algorithm/string/sequence_traits.hpp>
Header <boost/algorithm/string/split.hpp>
Header <boost/algorithm/string/std_containers_traits.hpp>
Header <boost/algorithm/string/trim.hpp>
Header <boost/algorithm/string_regex.hpp>
一些解釋
地區
正則表達式
環境
建構
示例
測試
可移植性
榮譽
致謝

簡介

string 算法庫提供 STL 所缺少的 string 相關算法的通用實現。它是 STL 算法庫以及它所包含的修剪,大小寫轉換,判斷式和查找/替換函數的擴展。它們全部具有多種不同變化,以便於針對某一特定需求做出最適當的選擇。

這一實現並不局限於特定的容器(比如 std::basic_string),而是盡可能地通用。這種通用化並不犧牲性能,因為如果容器的特殊特性會增進性能,算法就會使用這一特性。

特別注意:本文檔中我們使用術語 string 指稱一個存儲在任何容器中的 characters 的序列。一個 string 並不局限於 std::basic_string,而 character 也不一定就是 charwchar_t,雖然這些是最常見的情形。請參考 design 章節中關於所支持的 string 類型的各種明確的規範。

本庫接口函數和類定義在名字空間 boost::algorithm 中,而且通過 using 聲明,它們也可以生存在名字空間 boost 中。

本文檔分為幾個部分。如果想快速開始,可以閱讀 Usage(用法) 部分,然後是 Quick Reference(快速參考)The Design Topics(設計討論), Concepts(概念)Rationale(一些解釋)提供了關於庫的設計和構造的一些解釋,以及應該如何使用的說明。關於本庫提供的工具和算法的完整列表請參見 Reference(參考)。參考中的函數和類根據定義它們的頭文件進行組織。參考中包含一些鏈接,可以鏈到本庫中每一個實體的細節描述。

Last revised: February 27, 2008 at 15:00:24 -0500


PrevUpHomeNext