summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2013-11-13 11:22:24 -0800
committerChris Dyer <redpony@gmail.com>2013-11-13 11:22:24 -0800
commit1b39e848903743990ca16e2323235b31db20178c (patch)
tree19fceda02d09c9d4990aba692ed97193020d1e86 /utils
parentf83186887c94b2ff8b17aefcd0b395f116c09eb6 (diff)
parent4c7d24c9357f500839f04c7c8a8cfa0472801e18 (diff)
Merge pull request #27 from pks/master
Tidying (soft) syntax features; loo for C++ extractor; updates for dtrain
Diffstat (limited to 'utils')
-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> {