namespace Just.Core.Extensions; public static class SystemStringExtensions { /// /// Indicates whether the specified string is null or an empty string (""). /// /// The string to test. /// true if the value parameter is null or an empty string (""); otherwise, false. public static bool IsNullOrEmpty([NotNullWhen(false)] this string? str) => string.IsNullOrEmpty(str); /// /// Indicates whether a specified string is null, empty, or consists only of white-space /// characters. /// /// The string to test. /// true if the value parameter is null or , or if value consists /// exclusively of white-space characters. public static bool IsNullOrWhiteSpace([NotNullWhen(false)] this string? str) => string.IsNullOrWhiteSpace(str); /// /// Indicates whether the specified string contains any characters. /// /// The string to test. /// true if the value parameter contains any characters; otherwise, false. public static bool IsNotNullOrEmpty([NotNullWhen(true)] this string? str) => !string.IsNullOrEmpty(str); /// /// Indicates whether a specified string contains non white-space characters. /// /// The string to test. /// true if the value parameter contains non white-space characters; otherwise, false. public static bool IsNotNullOrWhiteSpace([NotNullWhen(true)] this string? str) => !string.IsNullOrWhiteSpace(str); }