Äqualivent zu StrLower()
-
Wie das Thema schon sagt, suche ich eine gleichwertige Funktion in Linux zu StrLower()!
-
Es gibt nur die tolower()/toupper()-Funktionen aus der ctype.h bzw. <cctype> die sich auf einzelne Zeichen beziehen.
#include <cctype> #include <string> #include <algorithm> using namespace std; std::string tolower(const std::string& t) { string n; n.resize( t.length() ); transform( t.begin(), t.end(), n.begin(), std::tolower ); return n; } std::string toupper(const std::string& t) { string n; n.resize( t.length() ); transform( t.begin(), t.end(), n.begin(), std::toupper ); return n; }