Events-MVC (example with htmx)
This commit is contained in:
10
Events-MVC/Events.MVC/Util/Extensions/StringExtensions.cs
Normal file
10
Events-MVC/Events.MVC/Util/Extensions/StringExtensions.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Events.MVC.Util.Extensions;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string? TrimToNull(this string? value)
|
||||
{
|
||||
var trimmed = value?.Trim();
|
||||
return string.IsNullOrEmpty(trimmed) ? null : trimmed;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user