|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
字符特征模板 更多...
#include <char_traits.hpp>
额外继承的成员函数 | |
| Public 类型 继承自 base_char_traits< CharT, int64_t > | |
| using | char_type |
| 字符类型 | |
| using | int_type |
| 整数类型 | |
| 静态 Public 成员函数 继承自 base_char_traits< CharT, int64_t > | |
| static constexpr char_type * | copy (char_type *dest, const char_type *srcs, const size_t count) noexcept |
| 复制字符序列 | |
| static constexpr char_type * | move (char_type *dest, const char_type *srcs, const size_t count) noexcept |
| 移动字符序列 | |
| static NEFORCE_NODISCARD constexpr int | compare (const char_type *lhs, const char_type *rhs, size_t count) noexcept |
| 比较两个字符序列 | |
| static NEFORCE_NODISCARD constexpr size_t | length (const char_type *str) noexcept |
| 计算字符串长度 | |
| static NEFORCE_NODISCARD constexpr const char_type * | find (const char_type *str, const size_t count, const char_type target) noexcept |
| 在字符序列中查找指定字符 | |
| static constexpr char_type * | assign (char_type *const str, const size_t count, const char_type chr) noexcept |
| 将字符序列中的每个字符设置为指定值 | |
| static NEFORCE_NODISCARD constexpr bool | eq (const char_type lhs, const char_type rhs) noexcept |
| 相等比较 | |
| static NEFORCE_NODISCARD constexpr bool | lt (const char_type lhs, const char_type rhs) noexcept |
| 小于比较 | |
| static NEFORCE_NODISCARD constexpr int_type | not_eof (const int_type rsc) noexcept |
| 如果不是EOF则返回原值,否则返回0 | |
| static NEFORCE_NODISCARD constexpr int_type | eof () noexcept |
| 返回EOF值 | |
字符特征模板
| CharT | 字符类型 |
默认使用base_char_traits,针对具体字符类型有特化。
在文件 char_traits.hpp 第 225 行定义.