tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
atof.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_CSTDLIB_ATOF_HPP
5#define TETL_CSTDLIB_ATOF_HPP
6
7#include <etl/_strings/to_floating_point.hpp>
8
9namespace etl {
10
11/// \brief Interprets a floating point value in a byte string pointed to by str.
12[[nodiscard]] constexpr auto atof(char const* str) noexcept -> double
13{
14 return strings::to_floating_point<double>(str).value;
15}
16
17} // namespace etl
18
19#endif // TETL_CSTDLIB_ATOF_HPP
Definition find.hpp:9
constexpr auto to_floating_point(etl::string_view str) noexcept -> to_floating_point_result< Float >
Definition to_floating_point.hpp:28
Definition adjacent_find.hpp:9
constexpr auto atof(char const *str) noexcept -> double
Interprets a floating point value in a byte string pointed to by str.
Definition atof.hpp:12