MString streaming work.

This commit is contained in:
Brad Arant committed 2024-03-26 11:09:07 -07:00
1 parent 77d5ea61dd
commit f6e5e60e5b
6 files changed
+25 -2

No files matched your search

+10
View File
@@ -153,6 +153,16 @@ namespace coreutils {
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>&)) {
// int temp = length;
// int len = length + value.length();
// setSize(len);
// memcpy(data + temp, value.c_str(), value.length());
std::cout << "xxx" << std::endl;
return *this;
}
void MString::insert(char ch, int offset) {
setSize(length + 1);