Screenie/Util/StringExt.cs

12 lines
321 B
C#

namespace Screenie.Util;
internal static class StringExt {
internal static string? EmptyToNull(this string? text) {
return string.IsNullOrEmpty(text) ? null : text;
}
internal static string? WhitespaceToNull(this string? text) {
return string.IsNullOrWhiteSpace(text) ? null : text;
}
}