mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Update Player.cpp
This commit is contained in:
parent
b3b57d5b2b
commit
f278d151d6
@ -113,8 +113,8 @@ int32_t GetSkinID(StackStrF & name)
|
|||||||
{
|
{
|
||||||
// Clone the string into an editable version
|
// Clone the string into an editable version
|
||||||
String str(name.mPtr, static_cast< size_t >(name.mLen));
|
String str(name.mPtr, static_cast< size_t >(name.mLen));
|
||||||
// Strip non alphanumeric characters from the name
|
// Strip non-alphanumeric characters from the name
|
||||||
str.erase(std::remove_if(str.begin(), str.end(), std::not1(std::ptr_fun(::isalnum))), str.end());
|
str.erase(std::remove_if(str.begin(), str.end(), std::function<int(int)>(::isalnum)), str.end());
|
||||||
// Convert the string to lowercase
|
// Convert the string to lowercase
|
||||||
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
|
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
|
||||||
// See if we still have a valid name after the cleanup
|
// See if we still have a valid name after the cleanup
|
||||||
|
Loading…
Reference in New Issue
Block a user