mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Add flag to remove non-ASCII characters from items
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user