Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit bf2637df authored by Michael KRISPER's avatar Michael KRISPER
Browse files

faster whitespace removement in EnumHelper

parent 3e7a645b
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ namespace TUGraz.VectoCommon.Utils
{
public static T ParseEnum<T>(this string s, bool ignoreCase = true)
{
return (T)Enum.Parse(typeof(T), Regex.Replace(s, @"\s+", ""), ignoreCase);
return (T)Enum.Parse(typeof(T), s.RemoveWhitespace(), ignoreCase);
}
public static IEnumerable<T> GetValues<T>()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment