Removed Common

Change-Id: I01ea8f07220375c2ad9bc0092281d4f27c642303
diff --git a/aos/util/string_to_num.h b/aos/util/string_to_num.h
new file mode 100644
index 0000000..86210ca
--- /dev/null
+++ b/aos/util/string_to_num.h
@@ -0,0 +1,29 @@
+#ifndef AOS_UTIL_STRING_TO_NUM_H_
+#define AOS_UTIL_STRING_TO_NUM_H_
+
+#include <sstream>
+#include <string>
+
+namespace aos {
+namespace util {
+
+// 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 type, it returns false.
+template<typename T>
+inline bool StringToNumber(const ::std::string &input, T *out_num) {
+  ::std::istringstream stream(input);
+  stream >> *out_num;
+
+  if (stream.fail() || !stream.eof()) {
+    return false;
+  }
+
+  return true;
+}
+
+
+}  // util
+}  // aos
+
+#endif