mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
More mob_info work
This commit is contained in:
+15
-3
@@ -72,6 +72,18 @@ const std::string str_tolower(std::string s)
|
||||
return s;
|
||||
}
|
||||
|
||||
std::vector<std::string> split(std::string str_to_split, char delimiter)
|
||||
{
|
||||
std::stringstream ss(str_to_split);
|
||||
std::string item;
|
||||
std::vector<std::string> exploded_values;
|
||||
while (std::getline(ss, item, delimiter)) {
|
||||
exploded_values.push_back(item);
|
||||
}
|
||||
|
||||
return exploded_values;
|
||||
}
|
||||
|
||||
const std::string str_toupper(std::string s)
|
||||
{
|
||||
std::transform(
|
||||
@@ -85,16 +97,16 @@ const std::string ucfirst(std::string s)
|
||||
{
|
||||
std::string output = s;
|
||||
if (!s.empty())
|
||||
output[0] = static_cast<char>(toupper(s[0]));
|
||||
output[0] = static_cast<char>(std::toupper(s[0]));
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
const std::string StringFormat(const char* format, ...)
|
||||
const std::string StringFormat(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
std::string output = vStringFormat(format,args);
|
||||
std::string output = vStringFormat(format, args);
|
||||
va_end(args);
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user