[ALL] Add flag to remove non-ASCII characters from items

This commit is contained in:
Matt Nadareski
2017-03-18 00:34:18 -07:00
parent 86cd96d077
commit 6263b5275f
7 changed files with 112 additions and 53 deletions

View File

@@ -454,6 +454,16 @@ namespace SabreTools.Helper.Tools
return new string(s.Where(c => !invalidPath.Contains(c)).ToArray());
}
/// <summary>
/// Remove all unicode-specific chars from a string
/// </summary>
/// <param name="s">Input string to clean</param>
/// <returns>Cleaned string</returns>
public static string RemoveUnicodeCharacters(string s)
{
return new string(s.Where(c => c > 255).ToArray());
}
/// <summary>
/// Split a line as if it were a CMP rom line
/// </summary>