Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 25759882 authored by Harald Martini's avatar Harald Martini
Browse files

added is null or emtpy and is null or whitespace extension methods

parent d1fd0b3f
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,16 @@ namespace TUGraz.VectoCommon.Utils
return int.Parse(self) != 0;
}
public static bool IsNullOrEmpty(this string self)
{
return string.IsNullOrEmpty(self);
}
public static bool IsNullOrWhiteSpace(this string self)
{
return string.IsNullOrWhiteSpace(self);
}
public static double IndulgentParse(this string self) =>
double.Parse(new string(self.Trim().TakeWhile(c => char.IsDigit(c) || c == '.').ToArray()),
CultureInfo.InvariantCulture);
......
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