#pragma once #include #include namespace ppc::str { std::vector split(const std::string &splittable, std::initializer_list splitters, bool remove_empty_entries = false); std::string trim(std::string splittable, std::initializer_list splitters = { ' ', '\n', '\t', '\r' }); inline bool begins_with(const std::string &str, const std::string &other) { return !str.find(other); } inline bool ends_with(const std::string &str, const std::string &other) { return str.find_last_of(other) == (str.length() - other.length()); } }