From 28183ed24fe1e85eaa9df0317d6233bb9d37e48f Mon Sep 17 00:00:00 2001 From: Gabriele Contini <contini.mailing@gmail.com> Date: 周日, 24 11月 2019 21:25:23 +0800 Subject: [PATCH] tests ok --- src/library/base/StringUtils.h | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/library/base/StringUtils.h b/src/library/base/StringUtils.h index bbb9ce3..8134349 100644 --- a/src/library/base/StringUtils.h +++ b/src/library/base/StringUtils.h @@ -2,12 +2,14 @@ * StringUtils.h * * Created on: Apr 8, 2014 - * + * */ #ifndef STRINGUTILS_H_ #define STRINGUTILS_H_ + #include <string> +#include <vector> namespace license { using namespace std; @@ -23,6 +25,20 @@ string toupper_copy(const string& lowercase); time_t seconds_from_epoch(const char* s); -} /* namespace license */ + +/** + * Split a string on a given character + */ +const vector<string> split_string(const string& stringToBeSplit, const char splitchar); + +typedef enum { + INI, BASE64, UNKNOWN +} FILE_FORMAT; + +FILE_FORMAT identify_format(const string& license); + +} + +/* namespace license */ #endif /* STRINGUTILS_H_ */ -- Gitblit v1.9.1