PKHeX/PKHeX.Core/Util/PathUtil.cs
Kurt 78a557c3cd misc tweaks
simplify some linq usage
2017-10-08 22:14:47 -07:00

17 lines
437 B
C#

using System.IO;
namespace PKHeX.Core
{
public 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);
}
}
}