StringUtility.cpp
// Loads a file as a really big string; returns true on success.
Loads a file as a really big string; returns true on success.
Loads a file as a really big string ; returns true on success .
bool StringUtility::LoadStringFromFile(const std::string& filename, std::string& result)
{
    std::ifstream file (filename.c_str());
    if (!file) 
    {
        return false;
    }
    std::stringstream stream;
    stream << file.rdbuf();
    result = stream.str();
    file.close();
    return true;
}
bool StringUtility :: LoadStringFromFile ( const std :: string & filename , std :: string & result ) { std :: ifstream file ( filename . c_str ( ) ) ; if ( ! file ) { return false ; } std :: stringstream stream ; stream << file . rdbuf ( ) ; result = stream . str ( ) ; file . close ( ) ; return true ; }
Loads a file as a really big string; returns true on success.
Loads a file as a really big string ; returns true on success .