From 0a7f6d0b5935f9794dda8935d37d4238bed3d611 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 28 Nov 2001 22:03:53 +0000 Subject: Some changes... --- lib/String.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/String.cc') 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; } -- cgit v1.2.3