[Style] Remove StripInvalidPathChars

This commit is contained in:
Matt Nadareski
2016-09-26 12:14:54 -07:00
parent 70e36de17c
commit 9d3c690042

View File

@@ -436,17 +436,6 @@ namespace SabreTools.Helper
return bytes;
}
/// <summary>
/// http://stackoverflow.com/questions/146134/how-to-remove-illegal-characters-from-path-and-filenames
/// </summary>
public static string StripInvalidPathChars(string s)
{
string regexSearch = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
Regex r = new Regex(string.Format("[{0}]", Regex.Escape(regexSearch)));
s = r.Replace(s, "");
return s;
}
/// <summary>
/// http://stackoverflow.com/questions/5613279/c-sharp-hex-to-ascii
/// </summary>