Fixed Nz::String's implementation of std::geltine (#136)
* Fix Nz::String's std::getline * Bugfix * Bugfix again
This commit is contained in:
@@ -5975,20 +5975,7 @@ namespace std
|
|||||||
|
|
||||||
istream& getline(istream& is, Nz::String& str)
|
istream& getline(istream& is, Nz::String& str)
|
||||||
{
|
{
|
||||||
str.Clear();
|
return getline(is, str, is.widen('\n'));
|
||||||
|
|
||||||
char c;
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
is.get(c);
|
|
||||||
if (c != '\n' && c != '\0')
|
|
||||||
str += c;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return is;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -6012,8 +5999,12 @@ namespace std
|
|||||||
if (c != delim && c != '\0')
|
if (c != delim && c != '\0')
|
||||||
str += c;
|
str += c;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (c == '\0')
|
||||||
|
is.setstate(std::ios_base::eofbit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user