Added ZString.c_str() function; Added MStrin operator=.
This commit is contained in:
1 parent
2a4fc0ad6f
commit
287933f9ce
7 files changed
+60
-5
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user