From 79f2b46f721b69bc182f35324f8fc195a5cf3f54 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 14 12月 2019 11:35:52 +0800 Subject: [PATCH] fix windows compilation, better cmake output --- src/library/base/StringUtils.h | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/library/base/StringUtils.h b/src/library/base/StringUtils.h index bbb9ce3..41f303a 100644 --- a/src/library/base/StringUtils.h +++ b/src/library/base/StringUtils.h @@ -2,15 +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 @@ -18,11 +19,24 @@ * @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); -} /* namespace license */ + +/** + * Split a string on a given character + */ +const std::vector<std::string> split_string(const std::string& stringToBeSplit, const char splitchar); + +typedef enum { + INI, BASE64, UNKNOWN +} FILE_FORMAT; + +FILE_FORMAT identify_format(const std::string& license); +} + +/* namespace license */ #endif /* STRINGUTILS_H_ */ -- Gitblit v1.9.1