NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
to_numerics.hpp 文件参考

字符串到数值的转换函数 更多...

to_numerics.hpp 的引用(Include)关系图:

浏览该文件的源代码.

函数

constexpr float32_t neforce::to_float32 (const string_view sv, size_t *idx=nullptr)
 将字符串转换为32位浮点数
constexpr float64_t neforce::to_float64 (const string_view sv, size_t *idx=nullptr)
 将字符串转换为64位浮点数
constexpr decimal_t neforce::to_decimal (const string_view sv, size_t *idx=nullptr)
 将字符串转换为decimal浮点数
constexpr int64_t neforce::to_int64 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为64位有符号整数
constexpr uint64_t neforce::to_uint64 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为64位无符号整数
constexpr int32_t neforce::to_int32 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为32位有符号整数
constexpr uint32_t neforce::to_uint32 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为32位无符号整数
constexpr int16_t neforce::to_int16 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为16位有符号整数
constexpr uint16_t neforce::to_uint16 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为16位无符号整数
constexpr int8_t neforce::to_int8 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为8位有符号整数
constexpr uint8_t neforce::to_uint8 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为8位无符号整数
constexpr uint128_t neforce::to_uint128 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为128位无符号整数
constexpr int128_t neforce::to_int128 (const string_view sv, size_t *idx=nullptr, const int base=10)
 将字符串转换为128位有符号整数
constexpr uint128_t neforce::operator""_u128 (const char *str, const size_t len)
 128位无符号整数字符串字面量
constexpr int128_t neforce::operator""_i128 (const char *str, const size_t len)
 128位有符号整数字符串字面量

详细描述

字符串到数值的转换函数

此文件提供了将字符串转换为各种数值类型的函数。 支持整数、浮点数的转换,包括进制转换和错误处理。

在文件 to_numerics.hpp 中定义.