Skip to content

Commit

Permalink
Convert: remove as_(uppercase/lowercase), as they're not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
LupertEverett authored and dpjudas committed Jul 5, 2024
1 parent 20a6ab8 commit 680eac1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
18 changes: 0 additions & 18 deletions SurrealEngine/Utils/Convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,3 @@ double Convert::to_double(const std::string& str)
Exception::Throw(e.what() + std::string(" (value = ") + str + ")");
}
}

std::string Convert::as_lowercase(const std::string& str)
{
std::string result{ str };

std::transform(result.begin(), result.end(), result.begin(), [](unsigned char c) { return std::tolower(c); });

return result;
}

std::string Convert::as_uppercase(const std::string& str)
{
std::string result{ str };

std::transform(result.begin(), result.end(), result.begin(), [](unsigned char c) { return std::toupper(c); });

return result;
}
5 changes: 0 additions & 5 deletions SurrealEngine/Utils/Convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ class Convert

static float to_float(const std::string& str);
static double to_double(const std::string& str);

// String manipulations
// These make a copy of the string with the desired operation applied
std::string as_lowercase(const std::string& str);
std::string as_uppercase(const std::string& str);
};

0 comments on commit 680eac1

Please sign in to comment.