This commit is contained in:
Your Name
2025-05-23 21:41:33 +12:00
parent 94f77994f0
commit 048345c636
21 changed files with 377 additions and 203 deletions

View File

@@ -9,6 +9,7 @@
#include <random>
#include <sys/ioctl.h>
#include <unistd.h>
#include <cctype>
namespace dropshell {
@@ -432,4 +433,16 @@ std::string get_line_wrap(std::string &src, int maxchars)
return remove_return(out) + '\n';
}
std::string tolower(const std::string& str) {
if (str.empty()) return str;
std::string result;
result.reserve(str.size()); // Pre-allocate space for efficiency
for (unsigned char c : str) {
result.push_back(std::tolower(c));
}
return result;
}
} // namespace dropshell