2017-05-12 16:33:12 +00:00
|
|
|
|
using System.IO;
|
2017-05-12 04:34:18 +00:00
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
2018-05-12 19:28:48 +00:00
|
|
|
|
public static partial class Util
|
2017-05-12 04:34:18 +00:00
|
|
|
|
{
|
|
|
|
|
public static string CleanFileName(string fileName)
|
|
|
|
|
{
|
2017-10-09 05:14:47 +00:00
|
|
|
|
return string.Concat(fileName.Split(Path.GetInvalidFileNameChars()));
|
2017-05-12 04:34:18 +00:00
|
|
|
|
}
|
2018-07-29 20:27:48 +00:00
|
|
|
|
|
2017-05-12 04:34:18 +00:00
|
|
|
|
public static string TrimFromZero(string input)
|
|
|
|
|
{
|
|
|
|
|
int index = input.IndexOf('\0');
|
|
|
|
|
return index < 0 ? input : input.Substring(0, index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|