diff options
author | Patrick Simianer <p@simianer.de> | 2013-11-05 18:15:18 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2013-11-05 18:15:18 +0100 |
commit | a7a0773b0e299f71409cf4a13d18ea7db5ab3fc1 (patch) | |
tree | a7c570f748480fd17c82e82163d1c2dbd5315a3f /utils/filelib.h | |
parent | 5a23ee2ae792b629e0f52b9c7fdf293de60a0ca1 (diff) |
syntax features now read trees from files -- no more escaping!
Diffstat (limited to 'utils/filelib.h')
-rw-r--r-- | utils/filelib.h | 5 |
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> { |