bug fixes on mstring and jstring.
This commit is contained in:
1 parent
0d60cce8dc
commit
83e9b8ca99
5 files changed
+23
-13
No files matched your search
+9
-8
@@ -165,7 +165,8 @@ namespace coreutils {
|
||||
MString &MString::operator<<(const int value) {
|
||||
std::stringstream temp;
|
||||
temp << value;
|
||||
*this << temp.str();
|
||||
MString temp2 = temp.str();
|
||||
write(temp2);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -185,13 +186,13 @@ namespace coreutils {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MString &MString::operator<<(std::string value) {
|
||||
int temp = length;
|
||||
int len = length + value.length();
|
||||
setSize(len);
|
||||
memcpy(data + temp, value.c_str(), value.length());
|
||||
return *this;
|
||||
}
|
||||
// MString &MString::operator<<(std::string value) {
|
||||
// int temp = length;
|
||||
// int len = length + value.length();
|
||||
// setSize(len);
|
||||
// memcpy(data + temp, value.c_str(), value.length());
|
||||
// return *this;
|
||||
// }
|
||||
|
||||
// MString &MString::operator<<(std::ostream (*f)(std::ostream&)) {
|
||||
MString &MString::operator<<(std::basic_ostream<char> (*pf)(std::basic_ostream<char>&)) {
|
||||
|
||||
Reference in new issue
Block a user