mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-02 12:03:51 +00:00
Fix for bug #1738
getTrailingNumber("string") and stripTrailingNumber("string") will now work for single letter cases. For example, getTrailingNumber() will return "11" if the input is "a11" or "t11", and stripTrailingNumber() will return "a" if the input is "a11".
This commit is contained in:
parent
513789c2c7
commit
5378abfc55
1 changed files with 1 additions and 1 deletions
|
|
@ -1620,7 +1620,7 @@ String String::GetTrailingNumber(const char* str, S32& number)
|
|||
if ((*p == '-') || (*p == '_'))
|
||||
number = -dAtoi(p + 1);
|
||||
else
|
||||
number = ((p == base.c_str()) ? dAtoi(p) : dAtoi(++p));
|
||||
number = (isdigit(*p) && (p == base.c_str()) ? dAtoi(p) : dAtoi(++p));
|
||||
|
||||
// Remove space between the name and the number
|
||||
while ((p > base.c_str()) && dIsspace(*(p-1)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue