diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-08-16 18:49:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-08-16 18:49:28 (GMT) |
commit | dcf2beb7dec757b7e28eba43fb7f2d5498bded39 (patch) | |
tree | b4dcb409eea4f99a58f02711edba5452c8613cfc /Source/cmSystemTools.cxx | |
parent | 6f1781c63ad58c3c84987dce7eee36668ed2ba57 (diff) | |
parent | 935fbe0b0454163678bc4ef19e1bee95a7a31b4d (diff) | |
download | CMake-dcf2beb7dec757b7e28eba43fb7f2d5498bded39.zip CMake-dcf2beb7dec757b7e28eba43fb7f2d5498bded39.tar.gz CMake-dcf2beb7dec757b7e28eba43fb7f2d5498bded39.tar.bz2 |
Merge topic 'cmStringAlgorithms_ulong'
935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3681
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ee60f16..9341f83 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2854,28 +2854,6 @@ bool cmSystemTools::RepeatedRemoveDirectory(const std::string& dir) #endif } -bool cmSystemTools::StringToLong(const char* str, long* value) -{ - errno = 0; - char* endp; - *value = strtol(str, &endp, 10); - return (*endp == '\0') && (endp != str) && (errno == 0); -} - -bool cmSystemTools::StringToULong(const char* str, unsigned long* value) -{ - errno = 0; - char* endp; - while (isspace(*str)) { - ++str; - } - if (*str == '-') { - return false; - } - *value = strtoul(str, &endp, 10); - return (*endp == '\0') && (endp != str) && (errno == 0); -} - std::string cmSystemTools::EncodeURL(std::string const& in, bool escapeSlashes) { std::string out; |