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

Function tolower_cp437

library/MiscUtils.cpp:261–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261char tolower_cp437(char c)
262{
263 switch (c)
264 {
265 case (char)154: // 'Ü'
266 return (char)129; // 'ü'
267 case (char)165: // 'Ñ'
268 return (char)164; // 'ñ'
269 case (char)142: // 'Ä'
270 return (char)132; // 'ä'
271 case (char)143: // 'Å'
272 return (char)134; // 'å'
273 case (char)144: // 'É'
274 return (char)130; // 'é'
275 case (char)153: // 'Ö'
276 return (char)148; // 'ö'
277 case (char)128: // 'Ç'
278 return (char)135; // 'ç'
279 case (char)146: // 'Æ'
280 return (char)145; // 'æ'
281 default: // tolower consistently across locales
282 return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c;
283 }
284}
285
286std::string toUpper_cp437(const std::string &str)
287{

Callers 1

toLower_cp437Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected