fix: Cleans up some string allocations from trim (#1759)
This commit is contained in:
parent
9d2f471e91
commit
d77668d77a
9 changed files with 15 additions and 22 deletions
|
|
@ -784,7 +784,8 @@ namespace Server.Multis
|
|||
|
||||
if (e.Speech.Length > 8)
|
||||
{
|
||||
Rename(e.Speech[8..].Trim().DefaultIfNullOrEmpty(null));
|
||||
var newName = e.Speech.AsSpan(8).Trim();
|
||||
Rename(newName.Length == 0 ? null : newName.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue