Added startsWithDouble() method on ZString.

This commit is contained in:
Brad Arant committed 2024-08-01 15:03:28 -07:00
1 parent 0db4be8a99
commit 39fd88cad9
3 files changed
+29 -1

No files matched your search

+9
View File
@@ -267,6 +267,15 @@ namespace coreutils {
return strncmp(cursor, value, strlen(value)) == 0;
}
bool ZString::startsWithDouble() {
push();
char *tempc = cursor;
double temp = strtod(cursor, &cursor);
int diff = cursor - tempc;
pop();
return diff != 0;
}
int ZString::compare(ZString zstring) {
char *end1 = data + length;
char *end2 = zstring.getData() + zstring.getLength();