diff --git a/Dalamud/Utility/StringExtensions.cs b/Dalamud/Utility/StringExtensions.cs index d5c1dfc14..f452a2a0f 100644 --- a/Dalamud/Utility/StringExtensions.cs +++ b/Dalamud/Utility/StringExtensions.cs @@ -12,5 +12,19 @@ namespace Dalamud.Utility /// Format arguments. /// Formatted string. public static string Format(this string format, params object[] args) => string.Format(format, args); + + /// + /// 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(this string value) => string.IsNullOrEmpty(value); + + /// + /// 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 an empty string (""), or if value consists exclusively of white-space characters. + public static bool IsNullOrWhitespace(this string value) => string.IsNullOrWhiteSpace(value); } }