You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ubl-settings-diskquota/source/util.h

31 lines
811 B

#ifndef UTIL_H
#define UTIL_H
#include "project_lib.h"
using namespace std;
namespace Utils {
template<typename Type>
struct Result{
Type response;
int error;
};
struct Passwd {
string user;
int uid;
};
string format_str_size(int num, int index);
std::array<std::vector<std::string>, 5> read_csv(const std::string& filename);
std::string call(std::string cmd);
vector<int> find_all(string &str_ntp, string substr);
void str_remove(std::string& source, std::string to_remove);
void str_replace_all(string &str_base, string str_find, string str_replace);
std::vector<std::string> split(std::string text, char delim);
unsigned short read_uid_min_max(string filename, string search);
vector <string> pars_users();
string read_passwd(string username);
int synopsis_show(string str_link);
}
#endif