I have this - but it also handles nullable strings...
# social
s
I have this - but it also handles nullable strings 🙂
Copy code
cs
    public static bool HasValue([NotNullWhen(true)] this string? s)
    {
        return string.IsNullOrWhiteSpace(s) is false;
    }