Make string_to_num work with floats.
It basically amounts to a name change, because the functionality
was already there. There's also a new test for it.
Change-Id: I982ed9de87862bd65b29a81be858b45040bc9d45
diff --git a/aos/common/util/string_to_num.h b/aos/common/util/string_to_num.h
index c6dcb30..d99ed91 100644
--- a/aos/common/util/string_to_num.h
+++ b/aos/common/util/string_to_num.h
@@ -7,11 +7,11 @@
namespace aos {
namespace util {
-// Converts a string into a specified integral type. If it can't be converted
+// Converts a string into a specified numeric type. If it can't be converted
// completely or at all, or if the converted number would overflow the
-// specified integral type, it returns false.
+// specified type, it returns false.
template<typename T>
-inline bool StringToInteger(const ::std::string &input, T *out_num) {
+inline bool StringToNumber(const ::std::string &input, T *out_num) {
::std::istringstream stream(input);
stream >> *out_num;