mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-23 12:57:16 +00:00
[Doors] Have NPCs trigger double doors (#2821)
This commit is contained in:
1 parent
2b224d42ad
commit
0a114fae9a
3 files changed
+21
-1
No files matched your search
@@ -770,3 +770,16 @@ int Strings::ToInt(const std::string &s, int fallback)
|
||||
{
|
||||
return Strings::IsNumber(s) ? std::stoi(s) : fallback;
|
||||
}
|
||||
|
||||
std::string Strings::RemoveNumbers(std::string s)
|
||||
{
|
||||
int current = 0;
|
||||
for (int i = 0; i < s.length(); i++) {
|
||||
if (!isdigit(s[i])) {
|
||||
s[current] = s[i];
|
||||
current++;
|
||||
}
|
||||
}
|
||||
|
||||
return s.substr(0, current);
|
||||
}
|
||||
Reference in new issue
Block a user