Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 1.2 KB

File metadata and controls

38 lines (21 loc) · 1.2 KB

 

 

 

 

 

 

WStringToInt is a convert code snippet to convert Wt::WString to integer.

 


#include <cstdlib> #include <string> #include <Wt/WString> ///WStringToInt converts Wt::WString to integer ///From http://www.richelbilderbeek.nl/CppWStringToInt.htm int WStringToInt(const Wt::WString& s) {   const std::string t(s.toUTF8());   return std::atoi(t.c_str()); }