tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
atol.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CSTDLIB_ATOL_HPP
4#define TETL_CSTDLIB_ATOL_HPP
5
7
8namespace etl {
9
14[[nodiscard]] constexpr auto atol(char const* str) noexcept -> long
15{
16 auto const result = strings::to_integer<long>(str);
17 return result.value;
18}
19
20} // namespace etl
21
22#endif // TETL_CSTDLIB_ATOL_HPP
constexpr auto to_integer(string_view str, Int base=Int(10)) noexcept -> to_integer_result< Int >
Definition to_integer.hpp:93
Definition adjacent_find.hpp:8
constexpr auto atol(char const *str) noexcept -> long
Interprets an integer value in a byte string pointed to by str. Discards any whitespace characters un...
Definition atol.hpp:14