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 | decd2c4b1d4fb42a73a3217f347ea8f317e50869 (patch) | |
tree | e48207c1e7f1296aae3f5e0235ddf34bde52251e /utils | |
parent | 5cba65baf55b821cbc22b0ee0e3ae8dc9946ca0f (diff) |
syntax features now read trees from files -- no more escaping!
Diffstat (limited to 'utils')
-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> { |