2017-05-12 16:33:12 +00:00
|
|
|
|
using System.IO;
|
2017-05-12 04:34:18 +00:00
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
|
|
|
|
|
|
public static partial class Util
|
2017-05-12 04:34:18 +00:00
|
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Cleans the local <see cref="fileName"/> by removing any invalid filename characters.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>New string without any invalid characters.</returns>
|
|
|
|
|
public static string CleanFileName(string fileName)
|
2017-05-12 04:34:18 +00:00
|
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
|
return string.Concat(fileName.Split(Path.GetInvalidFileNameChars()));
|
2017-05-12 04:34:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|