summaryrefslogtreecommitdiff
path: root/utils/filelib.h
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-11-23 17:33:47 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-11-23 17:33:47 +0000
commit072c4bb1edde483b87b93bc6f4eec36fc8a21008 (patch)
tree6ceaa6ae1e08df9e523282740b14f4857236297c /utils/filelib.h
parent7e90b8ea10904f9b83f4e77e14c7396a3e6f7d5d (diff)
parent9e80389b9763aa4f7f626ec71b561ccf6948d3ad (diff)
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'utils/filelib.h')
-rw-r--r--utils/filelib.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/filelib.h b/utils/filelib.h
index b9ea3940..4fa69760 100644
--- a/utils/filelib.h
+++ b/utils/filelib.h
@@ -75,7 +75,10 @@ class ReadFile : public BaseFile<std::istream> {
}
}
}
-
+ void ReadAll(std::string& s) {
+ getline(*stream(), s, (char) EOF);
+ if (s.size() > 0) s.resize(s.size()-1);
+ }
};
class WriteFile : public BaseFile<std::ostream> {