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