diff --git a/X10D/src/StringExtensions/StringExtensions.cs b/X10D/src/StringExtensions/StringExtensions.cs index 9f08c43..34eb091 100644 --- a/X10D/src/StringExtensions/StringExtensions.cs +++ b/X10D/src/StringExtensions/StringExtensions.cs @@ -477,28 +477,6 @@ public static class StringExtensions : default; } - /// - /// Returns the current string, or an alternative value if the current string is null or empty, or optionally if the - /// current string consists of only whitespace. - /// - /// The value to check. - /// The alternative value if does not meet the criteria. - /// - /// Optional. If set to , will be returned also if - /// only consists of whitespace. - /// - /// Returns or . - /// is . - public static string WithAlternative(this string? value, string alternative, bool includeWhiteSpace = false) - { - if (alternative is null) - { - throw new ArgumentNullException(nameof(alternative)); - } - - return (includeWhiteSpace ? value?.AsNullIfWhiteSpace() : value?.AsNullIfEmpty()) ?? alternative; - } - /// /// Normalizes a string which may be either or empty to a specified alternative. ///