Added new 'type' function, other mods
This commit is contained in:
@@ -12,6 +12,20 @@
|
||||
|
||||
namespace util {
|
||||
|
||||
std::string tolower(std::string input) {
|
||||
for (int i = 0; i < int(input.size()); i++) {
|
||||
input[i] = std::tolower(input[i]);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
std::string toupper(std::string input) {
|
||||
for (int i = 0; i < int(input.size()); i++) {
|
||||
input[i] = std::toupper(input[i]);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
int64_t strtoint(const std::string &value, int64_t errval) {
|
||||
char *endptr;
|
||||
int64_t result = strtoll(value.c_str(), &endptr, 10);
|
||||
|
||||
Reference in New Issue
Block a user