Created destructive removeTrailingZeros() method on ZString.

This commit is contained in:
Brad Arant committed 2024-11-04 16:26:40 -08:00
1 parent faa794cf6b
commit bf4ff3fdac
3 files changed
+20 -1

No files matched your search

+10 -1
View File
@@ -544,7 +544,16 @@ namespace coreutils {
return true;
}
ZString ZString::removeTrailingZeros() {
if(length > 2) {
while((*(data + length - 1)) == '0')
--length;
if(*(data + length - 1) == '.')
--length;
}
return *this;
}
void ZString::nextChar() {
if(!eod())
++cursor;