tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
strtod.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CSTDLIB_STRTOD_HPP
4#define TETL_CSTDLIB_STRTOD_HPP
5
7
8namespace etl {
9
17[[nodiscard]] constexpr auto strtod(char const* str, char const** last = nullptr) noexcept -> double
18{
19 auto result = strings::to_floating_point<double>(str);
20 if (last != nullptr) {
21 *last = result.end;
22 }
23 return result.value;
24}
25
26} // namespace etl
27
28#endif // TETL_CSTDLIB_STRTOD_HPP
constexpr auto to_floating_point(etl::string_view str) noexcept -> to_floating_point_result< Float >
Definition to_floating_point.hpp:27
Definition adjacent_find.hpp:8
constexpr auto strtod(char const *str, char const **last=nullptr) noexcept -> double
Interprets a floating point value in a byte string pointed to by str.
Definition strtod.hpp:17