mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
14 lines
405 B
C#
14 lines
405 B
C#
using System.Text.RegularExpressions;
|
|
|
|
namespace AssetRipper.Processing;
|
|
|
|
internal static class GameObjectNameCleaner
|
|
{
|
|
private static readonly Regex copySuffixRegex = new Regex(@"\([0-9]+\)$", RegexOptions.Compiled);
|
|
|
|
public static string CleanName(string name)
|
|
{
|
|
string noClones = name.Replace("(Clone)", "", StringComparison.Ordinal);
|
|
return copySuffixRegex.Replace(noClones, "").Trim();
|
|
}
|
|
} |