Ignore:
Timestamp:
05/29/15 12:12:47 (10 years ago)
Author:
epyon
Message:
  • important fix in reverse_iterator operators
  • std::string functions removed or converted to string_ref in string.hh
  • capi.hh - more function forwards and usage of them instead of libc
  • more std removal
  • assert fix
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/stl/string.cc

    r374 r378  
    1111#include <cstdio>
    1212#include <cstdlib>
     13#include <fstream> // for slurp only
    1314
    1415using namespace nv;
     
    1617static const double s_power_10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000,
    171810000000, 100000000, 1000000000 };
     19
     20std::string nv::slurp( const std::string& filename )
     21{
     22        std::ifstream input( filename );
     23        //              if ( !input.is_open() ) NV_THROW( std::runtime_error, "File "+filename+" not found!");
     24        std::stringstream sstr;
     25        while ( input >> sstr.rdbuf() );
     26        return sstr.str();
     27}
    1828
    1929static inline void string_reverse( char* begin, char* end )
Note: See TracChangeset for help on using the changeset viewer.