summaryrefslogtreecommitdiff
path: root/lib/String.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2001-11-28 22:03:53 +0000
committerPixel <Pixel>2001-11-28 22:03:53 +0000
commit0a7f6d0b5935f9794dda8935d37d4238bed3d611 (patch)
tree8c45e37dd1e95df0efa3414d33ca2e7f597872e2 /lib/String.cc
parent9f2ad93e4dd13446a9df2304f1f74c4272739bea (diff)
Some changes...
Diffstat (limited to 'lib/String.cc')
-rw-r--r--lib/String.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/String.cc b/lib/String.cc
index 83adad7..60ca6df 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -181,12 +181,14 @@ ostream & operator<<(ostream & os, const String & s) {
}
istream & operator>>(istream & is, String & s) {
- char c;
+ char c = 0;
s.set("");
while (!is.eof()) {
- is >> c;
+ c = is.get();
+ if (c == '\n') return is;
+ if (c == '\r') continue;
s += c;
}