| 17 | ////////// |
| 18 | // Converts a string to type T. |
| 19 | template <typename T> inline T fromstring(const std::string s) |
| 20 | { |
| 21 | T result = 0; |
| 22 | std::stringstream str; |
| 23 | str << s; |
| 24 | str >> result; |
| 25 | return result; |
| 26 | } |
| 27 | |
| 28 | ////////// |
| 29 | // Specialization for converting a string to a string. |