From 205c71575c272a685011c641a33d26cf66cf60a0 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周一, 10 2月 2020 05:01:07 +0800
Subject: [PATCH] fix unit test with old versions of boost

---
 src/library/base/StringUtils.h |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/library/base/StringUtils.h b/src/library/base/StringUtils.h
index a52376d..02a679d 100644
--- a/src/library/base/StringUtils.h
+++ b/src/library/base/StringUtils.h
@@ -2,16 +2,16 @@
  * StringUtils.h
  *
  *  Created on: Apr 8, 2014
- *      
+ *
  */
 
 #ifndef STRINGUTILS_H_
 #define STRINGUTILS_H_
+
 #include <string>
 #include <vector>
 
 namespace license {
-using namespace std;
 
 /**
  * Eliminate whitespace from both sides of a string and returns a copy
@@ -19,16 +19,25 @@
  * @param string_to_trim
  * @return the trimmed string
  */
-string trim_copy(const string& string_to_trim);
+std::string trim_copy(const std::string& string_to_trim);
 
-string toupper_copy(const string& lowercase);
+std::string toupper_copy(const std::string& lowercase);
 
-time_t seconds_from_epoch(const char* s);
+time_t seconds_from_epoch(const std::string& timeString);
 
 /**
  * Split a string on a given character
  */
-const vector<string> split_string(const string& licensePositions, const char splitchar);
+const std::vector<std::string> split_string(const std::string& stringToBeSplit, const char splitchar);
+
+// strnln_s is not well supported and strlen is marked unsafe..
+size_t mstrnlen_s(const char* szptr, size_t maxsize);
+
+typedef enum {
+	INI, BASE64, UNKNOWN
+} FILE_FORMAT;
+
+FILE_FORMAT identify_format(const std::string& license);
 }
 
 /* namespace license */

--
Gitblit v1.9.1