mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 20:07:56 +00:00
Add cli character:copy-character and #copycharacter
This commit is contained in:
@@ -42,6 +42,7 @@ const std::string ucfirst(std::string s);
|
||||
std::vector<std::string> split(std::string str_to_split, char delimiter);
|
||||
const std::string StringFormat(const char* format, ...);
|
||||
const std::string vStringFormat(const char* format, va_list args);
|
||||
std::vector<std::string> wrap(std::vector<std::string> &src, std::string character);
|
||||
std::string implode(std::string glue, std::vector<std::string> src);
|
||||
std::string convert2digit(int n, std::string suffix);
|
||||
std::string numberToWords(unsigned long long int n);
|
||||
@@ -98,14 +99,14 @@ std::string implode(const std::string &glue, const std::pair<char, char> &encaps
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
|
||||
for (const T &src_iter : src) {
|
||||
oss << encapsulation.first << src_iter << encapsulation.second << glue;
|
||||
}
|
||||
|
||||
std::string output(oss.str());
|
||||
output.resize(output.size() - glue.size());
|
||||
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -121,7 +122,7 @@ std::vector<std::string> join_pair(const std::string &glue, const std::pair<char
|
||||
|
||||
for (const std::pair<T1, T2> &src_iter : src) {
|
||||
output.push_back(
|
||||
|
||||
|
||||
fmt::format(
|
||||
"{}{}{}{}{}{}{}",
|
||||
encapsulation.first,
|
||||
@@ -151,7 +152,7 @@ std::vector<std::string> join_tuple(const std::string &glue, const std::pair<cha
|
||||
for (const std::tuple<T1, T2, T3, T4> &src_iter : src) {
|
||||
|
||||
output.push_back(
|
||||
|
||||
|
||||
fmt::format(
|
||||
"{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
|
||||
encapsulation.first,
|
||||
|
||||
Reference in New Issue
Block a user