18 namespace StringToNumberParser
36 char* endPtr =
nullptr;
38 const auto result = strtol(begin, &endPtr, radix);
61 char* endPtr =
nullptr;
63 const auto result = strtod(begin, &endPtr);
78 char* endPtr =
nullptr;
80#if defined(ARDUINO_AVR_NANO) || defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560)
83 const float result =
static_cast<float>(strtod(begin, &endPtr));
87 const float result = strtof(begin, &endPtr);
オプショナル型
Definition Optional.hpp:62
Udon::Optional< T > Parse(const char *const begin, const char *const end, const int radix)
文字列を数値に変換する
Definition StringToNumberParser.hpp:28
Udon::Optional< int > Parse< int >(const char *const begin, const char *const end, const int radix)
Definition StringToNumberParser.hpp:53
Udon::Optional< float > Parse< float >(const char *const begin, const char *const end, const int)
Definition StringToNumberParser.hpp:76
Udon::Optional< long > Parse< long >(const char *const begin, const char *const end, const int radix)
Definition StringToNumberParser.hpp:34
Udon::Optional< double > Parse< double >(const char *const begin, const char *const end, const int)
Definition StringToNumberParser.hpp:59
constexpr NulloptT nullopt
無効値
Definition Optional.hpp:52
static_assert 失敗遅延用の型
Definition AlwaysFalse.hpp:39