Added installation for additional packages to game boot

This commit is contained in:
Peter Mcteague 2017-09-13 00:49:02 +01:00 committed by Nekotekina
parent 8901cc9ae6
commit 6702c14b88
5 changed files with 141 additions and 18 deletions

View file

@ -24,6 +24,12 @@ inline void strcpy_trunc(char (&dst)[N], const char (&src)[N2])
dst[count] = '\0';
}
template <std::size_t N>
inline bool ends_with(const std::string& src, const char (&end)[N])
{
return src.size() >= N - 1 && src.compare(src.size() - (N - 1), N - 1, end, N - 1) == 0;
}
namespace fmt
{
std::string replace_first(const std::string& src, const std::string& from, const std::string& to);