17 lines
451 B
C#
17 lines
451 B
C#
using System.Text;
|
|
|
|
namespace DeukBot4.Utilities
|
|
{
|
|
public static class StringExtensions
|
|
{
|
|
public static string RemoveSpecialCharacters(this string str) {
|
|
StringBuilder sb = new StringBuilder();
|
|
foreach (char c in str) {
|
|
if (char.IsLetterOrDigit(c) || char.IsWhiteSpace(c)) {
|
|
sb.Append(c);
|
|
}
|
|
}
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
} |