Broken
This commit is contained in:
@@ -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
|
Reference in New Issue
Block a user