#pragma once #ifndef _NB_CORE_TYPES #define _NB_CORE_TYPES #include #include #include namespace nb { #ifdef _NB_TARGET_WINDOWS const std::string NEWLINE("\r\n"); #endif // _NB_TARGET_WINDOWS #ifdef _NB_TARGET_LINUX const std::string NEWLINE("\n"); #endif // _NB_TARGET_LINUX template struct ConstexprMap { template constexpr ConstexprMap(Input inp) : _data{inp} {} protected: const std::array, N> _data; }; /* template T swap_endian(const T& val) { T ret; const int size = sizeof(T); auto retLoc = static_cast(&ret); auto valLoc = static_cast(&val); for (int i = 0; i < size; ++i) { memcpy(retLoc+i, valLoc+(size-i-1), 1); } return ret; } */ std::string find_and_replace(const std::string& original, const std::string& find, const std::string& replace); // using ByteVector = std::vector; } // namespace nb #endif // _NB_CORE_TYPES