Added asDouble method to ZString.

This commit is contained in:
Brad Arant committed 2024-06-15 10:43:41 -07:00
1 parent beb3673241
commit 1cfdc23a57
5 files changed
+18

No files matched your search

+5
View File
@@ -1,6 +1,7 @@
#include "ZString.h"
#include "Log.h"
#include "Exception.h"
#include <stdlib.h>
#include <iostream>
namespace coreutils {
@@ -106,6 +107,10 @@ namespace coreutils {
return tempInt;
}
double ZString::asDouble() {
return strtod(cursor, &cursor);
}
int ZString::incrementCursor(int length) {
char *temp = cursor;
if((cursor + length) > (data + this->length))