Added new 'type' function, other mods

This commit is contained in:
2021-02-07 15:35:31 -05:00
parent 076daaa3a2
commit 8c15e56fe9
6 changed files with 64 additions and 28 deletions

View File

@@ -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);