22#ifndef HARVESTER_PARSE_UTILS_H
23#define HARVESTER_PARSE_UTILS_H
27#include "common/str.h"
28#include "common/util.h"
38 bool negative =
false;
39 if (start < value.size() && (value[start] ==
'+' || value[start] ==
'-')) {
40 negative = value[start] ==
'-';
51 const uint64 magnitude = value.
substr(start, end - start).
asUint64();
53 if (magnitude > (uint64)INT_MAX + 1)
55 return -(int)magnitude;
58 if (magnitude > (uint64)INT_MAX)
60 return (
int)magnitude;
String substr(size_t pos=0, size_t len=npos) const