Dev Essential  1.6.3
Loading...
Searching...
No Matches
strings_convert_impl.h
Go to the documentation of this file.
1
14
15#ifndef A_UTIL_UTIL_STRINGS_DETAIL_STRINGS_CONVERT_IMPL_HEADER_INCLUDED
16#define A_UTIL_UTIL_STRINGS_DETAIL_STRINGS_CONVERT_IMPL_HEADER_INCLUDED
17
19
20namespace a_util {
21namespace strings {
22template <typename Numeric>
23bool toNumeric(const char* from, Numeric& to)
24{
25 return ToNumericConverter::convert(from, to);
26}
27
28template <typename Numeric>
29bool toNumeric(const std::string& from, Numeric& to)
30{
31 return ToNumericConverter::convert(from.c_str(), to);
32}
33
34template <typename Numeric>
35Numeric toNumeric(const char* from)
36{
37 Numeric to = Numeric();
39 return to;
40}
41
42template <typename Numeric>
43Numeric toNumeric(const std::string& from)
44{
45 Numeric to = Numeric();
46 ToNumericConverter::convert(from.c_str(), to);
47 return to;
48}
49
50} // namespace strings
51} // namespace a_util
52
53#endif // A_UTIL_UTIL_STRINGS_DETAIL_STRINGS_CONVERT_IMPL_HEADER_INCLUDED
Serves as component for string handling and conversion functionality.
Definition strings.h:20
bool toNumeric(const char *from, Numeric &to)
Definition strings_convert_impl.h:23
Serves as the root component, with common functionality documented in core functionality.
Definition base.h:24
static bool convert(const char *from, bool &to)