mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add IsNullOrEmpty, IsNullOrWhitespace to StringExtensions.cs
This commit is contained in:
parent
9199adb261
commit
bba3143d28
1 changed files with 14 additions and 0 deletions
|
|
@ -12,5 +12,19 @@ namespace Dalamud.Utility
|
|||
/// <param name="args">Format arguments.</param>
|
||||
/// <returns>Formatted string.</returns>
|
||||
public static string Format(this string format, params object[] args) => string.Format(format, args);
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the specified string is null or an empty string ("").
|
||||
/// </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);
|
||||
|
||||
/// <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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue