Added operator= integer operator.

This commit is contained in:
Brad Arant committed 2024-10-14 10:09:14 -07:00
1 parent 9d62a09140
commit 8648ab3152
3 files changed
+21 -2

No files matched your search

+9 -1
View File
@@ -139,7 +139,15 @@ namespace coreutils {
cursor = this->data;
return *this;
}
MString &MString::operator=(int value) {
std::string temp = std::format("{}", value);
setSize(temp.length());
memcpy(this->data, (char *)temp.data(), temp.length());
cursor = this->data;
return *this;
}
MString &MString::operator<<(const char *value) {
int temp = length;
int len = strlen(value);