Added ZString.c_str() function; Added MStrin operator=.

This commit is contained in:
Brad Arant committed 2022-07-16 21:33:55 -07:00
1 parent 2a4fc0ad6f
commit 287933f9ce
7 files changed
+60 -5

No files matched your search

+9
View File
@@ -47,6 +47,15 @@ namespace coreutils {
if(data)
free(data);
}
MString& MString::operator=(coreutils::ZString& value) {
if(*this == value)
return *this;
int len = length;
setSize(length + value.getLength());
memcpy(data + len, value.getData(), value.getLength());
return *this;
}
int MString::write(char ch) {
setSize(length + 1);