|
| template<typename... Args> |
| bool | is_or (const std::string &value, Args... args) |
| | 文字列が複数の候補値のいずれかと等しいか判定する
|
| void | st::replace_r (std::string &str, const std::string from, const std::string to) |
| | 文字列中のすべての from を to に置換する(参照渡し、インプレース版)
|
| std::string | st::replace (std::string str, const std::string from, const std::string to) |
| | 文字列中のすべての from を to に置換した新しい文字列を返す(値返し版)
|
| std::vector< std::string > | st::find (const std::string &input, std::string start, std::string end) |
| | 文字列中から start〜end に囲まれた部分文字列をすべて取り出す
|
| int | st::toi (const std::string &str) |
| | 文字列中の数字のみを抽出して整数に変換する
|
| std::vector< int > | st::toi (const std::vector< std::string > &input) |
| | 文字列ベクタの各要素を toi で整数に変換する
|
| std::vector< std::string > | st::split (const std::string &str, const std::string &delimiter) |
| | 文字列を単一のデリミタで分割する(文字列ベクタを返す)
|
| std::vector< int > | st::spliti (const std::string &str, const std::string &delimiter) |
| | 文字列を単一のデリミタで分割し、各要素を整数に変換する
|
| splits | st::split (const std::string &input, const std::vector< std::string > &targets) |
| | 文字列を複数のデリミタで分割し、どのデリミタで区切られたかを記録する
|
| splitsi | st::spliti (const std::string &input, const std::vector< std::string > &targets) |
| | 複数デリミタ版 split の結果を整数に変換する
|
| std::vector< std::string > | st::charV (const int i_argc, const char *const i_argv[]) |
| | char 配列 (argc/argv 形式) を文字列ベクタに変換する
|
| std::vector< int > | st::charVi (const int i_argc, const char *i_argv[]) |
| | char 配列 (argc/argv 形式) を整数ベクタに変換する
|
| size_t | st::size (const std::string &input) |
| | UTF-8 文字列のマルチバイト文字数(文字単位の長さ)を返す
|
文字列操作ユーティリティ
文字列の置換・検索・分割・変換など、よく使う文字列操作関数を st 名前空間および汎用関数として提供します。 UNICODE ビルド時は Boost.Locale による UTF-8/wstring 変換も利用できます。
string.h に定義があります。