mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-29 21:10:06 -06:00
17 lines
466 B
C#
17 lines
466 B
C#
namespace FileFlows.Nextcloud;
|
|
|
|
/// <summary>
|
|
/// Extension methods
|
|
/// </summary>
|
|
internal static class ExtensionMethods
|
|
{
|
|
/// <summary>
|
|
/// Returns an empty string as null, otherwise returns the original string
|
|
/// </summary>
|
|
/// <param name="str">the input string</param>
|
|
/// <returns>the string or null if empty</returns>
|
|
public static string? EmptyAsNull(this string str)
|
|
{
|
|
return str == string.Empty ? null : str;
|
|
}
|
|
} |