add trim_left and trim_right, add setup static asserts, update type_traits, refactor some code, add unit tests

This commit is contained in:
ado
2021-02-14 01:59:06 +01:00
parent ea42948c42
commit 2985027505
8 changed files with 381 additions and 146 deletions

19
include/ss/common.hpp Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <vector>
namespace ss {
struct none {};
using string_range = std::pair<const char*, const char*>;
using split_data = std::vector<string_range>;
constexpr inline auto default_delimiter = ",";
template <bool StringError>
inline void assert_string_error_defined() {
static_assert(StringError,
"'string_error' needs to be enabled to use 'error_msg'");
}
} /* ss */