mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Replace auth.txt with SQLite auth database (#7279)
* Replace auth.txt with SQLite auth database
This commit is contained in:
parent
1836882495
commit
153fb211ac
19 changed files with 1153 additions and 82 deletions
|
@ -704,3 +704,22 @@ inline const std::string duration_to_string(int sec)
|
|||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
/**
|
||||
* Joins a vector of strings by the string \p delimiter.
|
||||
*
|
||||
* @return A std::string
|
||||
*/
|
||||
inline std::string str_join(const std::vector<std::string> &list,
|
||||
const std::string &delimiter)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
bool first = true;
|
||||
for (const auto &part : list) {
|
||||
if (!first)
|
||||
oss << delimiter;
|
||||
oss << part;
|
||||
first = false;
|
||||
}
|
||||
return oss.str();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue