Changeset 675
- Timestamp:
- Dec 23, 2007, 12:39:40 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/misc/String2Number.h
r667 r675 80 80 const std::string& number2String(T variable, const std::string& fallbackString) 81 81 { 82 std::cout << "N2Sa: " << variable << std::endl;83 84 82 std::ostringstream oss; 85 83 if (oss << variable) 86 {87 std::cout << "N2Sb: " << oss.str() << std::endl;88 84 return *(new std::string(oss.str())); 89 }90 85 91 86 return fallbackString; … … 124 119 bool string2Number(T& variable, const std::string& valueString, T fallbackValue) 125 120 { 126 std::cout << "S2Na: " << valueString << std::endl;127 121 std::istringstream iss(valueString); 128 122 if (iss >> variable) 129 {130 std::cout << "S2Nb: " << variable << std::endl;131 123 return true; 132 }133 124 134 125 variable = fallbackValue;
Note: See TracChangeset
for help on using the changeset viewer.