public static string GetBareTextureForNineSliceTexture(string absoluteTexture)
{
string extension = FileManager.GetExtension(absoluteTexture);
string withoutExtension = FileManager.RemoveExtension(absoluteTexture);
string toReturn = withoutExtension;
foreach (var kvp in PossibleNineSliceEndings)
{
if (withoutExtension.EndsWith(kvp, StringComparison.OrdinalIgnoreCase))
{
toReturn = withoutExtension.Substring(0, withoutExtension.Length - kvp.Length);
break;
}
}
// No extensions, because we'll need to append that
//toReturn += "." + extension;
return toReturn;
}