MCPcopy Create free account
hub / github.com/SimHacker/micropolis / setCityName

Method setCityName

MicropolisCore/src/MicropolisEngine/src/utilities.cpp:242–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240
241
242void Micropolis::setCityName(const std::string &name)
243{
244 std::string cleanName;
245
246 int i;
247 int n = name.length();
248 for (i = 0; i < n; i++) {
249 char ch = name[i];
250 if (!isalnum(ch)) {
251 ch = '_';
252 }
253 cleanName.push_back(ch);
254 }
255
256 setCleanCityName(cleanName);
257}
258
259
260/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected