Some simple methos for working with strings, networking, filesystem, etc...
std::string temp_path();
- Return temporaly path. Just generating, no create.void create_path(const std::string &path);
- Creating pathvoid delete_path(const std::string &path);
- Deleting pathstd::string extract_filename(const std::string &path);
- Extract filename from pathbool file_exists(const std::string &path);
- Check file exists
std::string integerToIpAddr(const unsigned int &intIp);
- Convert integer ip address to string
std::string exec(const std::string &command);
- Executing command in shell and returning result
std::string rand_alnum_str(std::string::size_type sz);
- Generate random stringstd::string replace_all(const std::string &str, const std::string &from, const std::string &to);
- Replaces all inclusions in a substring with anotherbool contains(const std::string &str, const std::string &needle);
- Check string contain substringstd::string join(const std::vector<std::string> &strings, const std::string &delimiter = ", ");
- Join vector of string to single stringstd::string formatted_current_datetime(const std::string &format);
- Returning formatted current datetime