mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Style] Remove StripInvalidPathChars
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user