diff options
author | Pixel <Pixel> | 2001-11-28 22:03:53 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-28 22:03:53 +0000 |
commit | 0a7f6d0b5935f9794dda8935d37d4238bed3d611 (patch) | |
tree | 8c45e37dd1e95df0efa3414d33ca2e7f597872e2 /lib/String.cc | |
parent | 9f2ad93e4dd13446a9df2304f1f74c4272739bea (diff) |
Some changes...
Diffstat (limited to 'lib/String.cc')
-rw-r--r-- | lib/String.cc | 6 |
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; } |