mirror of
https://github.com/netchx/netch.git
synced 2026-03-16 17:53:17 +08:00
17 lines
396 B
C#
17 lines
396 B
C#
using System.IO;
|
|
using System.Text;
|
|
|
|
namespace Netch.Forms.Mode
|
|
{
|
|
public static class ModeEditorUtils
|
|
{
|
|
public static string ToSafeFileName(string text)
|
|
{
|
|
var fileName = new StringBuilder(text);
|
|
foreach (var c in Path.GetInvalidFileNameChars())
|
|
fileName.Replace(c, '_');
|
|
|
|
return fileName.ToString();
|
|
}
|
|
}
|
|
} |