mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
feat: fix code analysis for IsNullOrEmpty, IsNullOrWhitespace extensions
This commit is contained in:
parent
b083ea65c0
commit
399bc7b4de
1 changed files with 4 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Dalamud.Utility
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -18,13 +20,13 @@ namespace Dalamud.Utility
|
|||
/// </summary>
|
||||
/// <param name="value">The string to test.</param>
|
||||
/// <returns>true if the value parameter is null or an empty string (""); otherwise, false.</returns>
|
||||
public static bool IsNullOrEmpty(this string? value) => string.IsNullOrEmpty(value);
|
||||
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value) => string.IsNullOrEmpty(value);
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether a specified string is null, empty, or consists only of white-space characters.
|
||||
/// </summary>
|
||||
/// <param name="value">The string to test.</param>
|
||||
/// <returns>true if the value parameter is null or an empty string (""), or if value consists exclusively of white-space characters.</returns>
|
||||
public static bool IsNullOrWhitespace(this string? value) => string.IsNullOrWhiteSpace(value);
|
||||
public static bool IsNullOrWhitespace([NotNullWhen(false)] this string? value) => string.IsNullOrWhiteSpace(value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue