MCPcopy Create free account
hub / github.com/DFHack/dfhack / tolower

Function tolower

plugins/tiletypes.cpp:482–492  ·  view source on GitHub ↗

zilpin: These two functions were giving me compile errors in VS2008, so I cheated with the C style loop below, just to get it to build. Original code is commented out.

Source from the content-addressed store, hash-verified

480//zilpin: These two functions were giving me compile errors in VS2008, so I cheated with the C style loop below, just to get it to build.
481//Original code is commented out.
482void tolower(std::string &str)
483{
484 //The C++ way...
485 //std::transform(str.begin(), str.end(), str.begin(), std::bind2nd(std::ptr_fun(&std::tolower<char> ), std::locale("")));
486
487 //The C way...
488 for(char *c=(char *)str.c_str(); *c; ++c)
489 {
490 *c = tolower(*c);
491 }
492}
493
494void toupper(std::string &str)
495{

Callers 6

to_search_normalizedFunction · 0.85
ToLowerMethod · 0.85
str_lowerFunction · 0.85
match_classFunction · 0.85
processTileTypeFunction · 0.85
processCommandFunction · 0.85

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected