summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index baac7b8..9852dd6 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2923,3 +2923,11 @@ std::vector<std::string> cmSystemTools::tokenize(const std::string& str,
}
return tokens;
}
+
+//----------------------------------------------------------------------------
+bool cmSystemTools::StringToInt(const char* str, int* value)
+{
+ char *endp;
+ *value = static_cast<int>(strtol(str, &endp, 10));
+ return (*endp == '\0') && (endp != str);
+}