PKHeX/PKHeX.Core/Util/PathUtil.cs
2018-07-29 13:27:48 -07:00

18 lines
445 B
C#

using System.IO;
namespace PKHeX.Core
{
public static partial class Util
{
public static string CleanFileName(string fileName)
{
return string.Concat(fileName.Split(Path.GetInvalidFileNameChars()));
}
public static string TrimFromZero(string input)
{
int index = input.IndexOf('\0');
return index < 0 ? input : input.Substring(0, index);
}
}
}