mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 02:45:21 +02:00
Replace auth.txt with SQLite auth database (#7279)
* Replace auth.txt with SQLite auth database
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user