2
0
Fork 0
mirror of https://github.com/kwsch/PKHeX synced 2024-12-28 13:23:10 +00:00
PKHeX/PKHeX.Core/Util/PathUtil.cs

18 lines
444 B
C#
Raw Normal View History

2017-05-12 16:33:12 +00:00
using System.IO;
namespace PKHeX.Core
{
public static partial class Util
{
public static string CleanFileName(string fileName)
{
2017-10-09 05:14:47 +00:00
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);
}
}
}