aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/util.h b/src/util.h
index 55d9308ab6..27a08716dd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -170,8 +170,6 @@ std::string DecodeBase32(const std::string& str);
std::string EncodeBase32(const unsigned char* pch, size_t len);
std::string EncodeBase32(const std::string& str);
void ParseParameters(int argc, const char*const argv[]);
-bool WildcardMatch(const char* psz, const char* mask);
-bool WildcardMatch(const std::string& str, const std::string& mask);
void FileCommit(FILE *fileout);
bool TruncateFile(FILE *file, unsigned int length);
int RaiseFileDescriptorLimit(int nMinFD);
@@ -244,6 +242,13 @@ inline int atoi(const std::string& str)
return atoi(str.c_str());
}
+/**
+ * Convert string to signed 32-bit integer with strict parse error feedback.
+ * @returns true if the entire string could be parsed as valid integer,
+ * false if not the entire string could be parsed or when overflow or underflow occured.
+ */
+bool ParseInt32(const std::string& str, int32_t *out);
+
inline int roundint(double d)
{
return (int)(d > 0 ? d + 0.5 : d - 0.5);
@@ -329,13 +334,6 @@ inline std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
return pszTime;
}
-template<typename T>
-void skipspaces(T& it)
-{
- while (isspace(*it))
- ++it;
-}
-
inline bool IsSwitchChar(char c)
{
#ifdef WIN32