Changeset 438 for trunk/src/stl/string.cc
- Timestamp:
- 07/23/15 17:29:49 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/stl/string.cc
r435 r438 12 12 #include <cstdlib> 13 13 #include <fstream> // for slurp only 14 #include <sstream> // for slurp only 14 15 15 16 using namespace nv; 16 17 17 18 //static const double s_power_10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; 18 19 std::string nv::slurp( const std::string& filename )20 {21 std::ifstream input( filename );22 // if ( !input.is_open() ) NV_THROW( std::runtime_error, "File "+filename+" not found!");23 std::stringstream sstr;24 while ( input >> sstr.rdbuf() );25 return sstr.str();26 }27 19 28 20 static inline void string_reverse( char* begin, char* end )
Note: See TracChangeset
for help on using the changeset viewer.