Added startsWithDouble() method on ZString.
This commit is contained in:
1 parent
0db4be8a99
commit
39fd88cad9
3 files changed
+29
-1
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user