mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-16 00:58:01 +00:00
78a557c3cd
simplify some linq usage
17 lines
437 B
C#
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);
|
|
}
|
|
}
|
|
}
|