mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Move some text filtering functionality
This commit is contained in:
@@ -128,6 +128,17 @@ namespace SabreTools.Core.Tools
|
||||
return new string(input.Where(c => !invalidPath.Contains(c)).ToArray());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove all unicode-specific chars from a string
|
||||
/// </summary>
|
||||
public static string? RemoveUnicodeCharacters(string? input)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(input))
|
||||
return input;
|
||||
|
||||
return new string(input.Where(c => c <= 255).ToArray());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
Reference in New Issue
Block a user