|
Console Library 8.0.0
A header-only library that makes C++ simple
|
Functions | |
| Regex | compile (const std::string &pattern, std::regex::flag_type flags=std::regex::ECMAScript) |
| 编译字符串模式为正则表达式。 | |
| WRegex | compile (const std::wstring &pattern, std::wregex::flag_type flags=std::wregex::ECMAScript) |
| 编译字符串模式为宽字符正则表达式。 | |
| Regex::Match | search (const std::string &pattern, const std::string &text) |
| 在文本中搜索正则表达式的第一个匹配项。 | |
| WRegex::Match | search (const std::wstring &pattern, const std::wstring &text) |
| 在文本中搜索正则表达式的第一个匹配项。 | |
| Regex::Match | match (const std::string &pattern, const std::string &text) |
| 在文本中匹配正则表达式的第一个匹配项。 | |
| WRegex::Match | match (const std::wstring &pattern, const std::wstring &text) |
| 在文本中匹配正则表达式的第一个匹配项。 | |
| std::vector< std::string > | findall (const std::string &pattern, const std::string &text) |
| 在文本中查找所有匹配正则表达式的子串。 | |
| std::vector< std::wstring > | findall (const std::wstring &pattern, const std::wstring &text) |
| 在文本中查找所有匹配正则表达式的子串。 | |
| std::vector< std::string > | split (const std::string &pattern, const std::string &text, int maxsplit=0) |
| 在文本中按正则表达式模式分割字符串。 | |
| std::vector< std::wstring > | split (const std::wstring &pattern, const std::wstring &text, int maxsplit=0) |
| 在文本中按正则表达式模式分割字符串。 | |
| std::string | sub (const std::string &pattern, const std::string &repl, const std::string &text, int count=0) |
| 在文本中替换正则表达式匹配的子串。 | |
| std::wstring | sub (const std::wstring &pattern, const std::wstring &repl, const std::wstring &text, int count=0) |
| 在文本中替换正则表达式匹配的子串。 | |
| std::string | escape (const std::string &s) |
| 转义正则表达式中的特殊字符。 | |
| std::wstring | escape (const std::wstring &s) |
| 转义正则表达式中的特殊字符。 | |
|
inline |
编译字符串模式为正则表达式。
| pattern | 正则表达式模式字符串。 |
| flags | 正则表达式标志,默认为 ECMAScript 模式。 |
|
inline |
编译字符串模式为宽字符正则表达式。
| pattern | 正则表达式模式字符串。 |
| flags | 正则表达式标志,默认为 ECMAScript 模式。 |
|
inline |
转义正则表达式中的特殊字符。
| s | 要转义的字符串。 |
|
inline |
转义正则表达式中的特殊字符。
| s | 要转义的字符串。 |
|
inline |
在文本中查找所有匹配正则表达式的子串。
| pattern | 正则表达式模式字符串。 |
| text | 要查找的文本。 |
|
inline |
在文本中查找所有匹配正则表达式的子串。
| pattern | 正则表达式模式字符串。 |
| text | 要查找的文本。 |
|
inline |
在文本中匹配正则表达式的第一个匹配项。
| pattern | 正则表达式模式字符串。 |
| text | 要匹配的文本。 |
|
inline |
在文本中匹配正则表达式的第一个匹配项。
| pattern | 正则表达式模式字符串。 |
| text | 要匹配的文本。 |
|
inline |
在文本中搜索正则表达式的第一个匹配项。
| pattern | 正则表达式模式字符串。 |
| text | 要搜索的文本。 |
|
inline |
在文本中搜索正则表达式的第一个匹配项。
| pattern | 正则表达式模式字符串。 |
| text | 要搜索的文本。 |
|
inline |
在文本中按正则表达式模式分割字符串。
| pattern | 正则表达式模式字符串。 |
| text | 要分割的文本。 |
| maxsplit | 最大分割次数,默认为 0(不限制)。 |
|
inline |
在文本中按正则表达式模式分割字符串。
| pattern | 正则表达式模式字符串。 |
| text | 要分割的文本。 |
| maxsplit | 最大分割次数,默认为 0(不限制)。 |
|
inline |
在文本中替换正则表达式匹配的子串。
| pattern | 正则表达式模式字符串。 |
| repl | 替换字符串。 |
| text | 要替换的文本。 |
| count | 替换次数,默认为 0(替换所有匹配项)。 |
|
inline |
在文本中替换正则表达式匹配的子串。
| pattern | 正则表达式模式字符串。 |
| repl | 替换字符串。 |
| text | 要替换的文本。 |
| count | 替换次数,默认为 0(替换所有匹配项)。 |