JString fix to compress initial assignment JSON.
This commit is contained in:
1 parent
83e9b8ca99
commit
95254310f0
6 files changed
+45
-9
No files matched your search
+7
-1
@@ -234,8 +234,14 @@ namespace coreutils {
|
||||
void MString::replace(std::string value, int offset) {
|
||||
}
|
||||
|
||||
void MString::remove(int length) {
|
||||
int len = (data + this->length - cursor);
|
||||
for (int ix = 0; ix < len; ix++)
|
||||
cursor[ix] = cursor[ix + length];
|
||||
setSize(this->length - length);
|
||||
}
|
||||
|
||||
void MString::remove(int offset, int length) {
|
||||
// (data + this->length) > (data + offset + length) ? length: length; // TODO: Need to calculate correct length.
|
||||
for (int ix = offset; ix < this->length; ix++)
|
||||
getData()[ix] = getData()[ix + length];
|
||||
setSize(this->length - length);
|
||||
|
||||
Reference in new issue
Block a user