Class StringExtensions
Extension methods for System.String.
Inheritance
StringExtensions
Syntax
public static class StringExtensions : object
Methods
AsEmptyIfNull(String)
Returns an empty string ("") if this string is null.
Declaration
public static string AsEmptyIfNull(this string self)
Parameters
Type |
Name |
Description |
String |
self |
|
Returns
AsNullIfEmpty(String)
Returns null if this string is null or an empty string ("").
Declaration
public static string AsNullIfEmpty(this string self)
Parameters
Type |
Name |
Description |
String |
self |
|
Returns
AsNullIfWhiteSpace(String)
Returns null if this string is not null, empty, or consists only of white-space characters.
Declaration
public static string AsNullIfWhiteSpace(this string self)
Parameters
Type |
Name |
Description |
String |
self |
|
Returns
IsNotNullOrEmpty(String)
Indicates whether this string is not null or an empty string ("").
Declaration
public static bool IsNotNullOrEmpty(this string self)
Parameters
Type |
Name |
Description |
String |
self |
|
Returns
IsNotNullOrWhiteSpace(String)
Indicates whether this string is not null, empty, or consists only of white-space characters.
Declaration
public static bool IsNotNullOrWhiteSpace(this string self)
Parameters
Type |
Name |
Description |
String |
self |
|
Returns
IsNullOrEmpty(String)
Indicates whether this string is null or an empty string ("").
Declaration
public static bool IsNullOrEmpty(this string self)
Parameters
Type |
Name |
Description |
String |
self |
|
Returns
IsNullOrWhiteSpace(String)
Indicates whether this string is null, empty, or consists only of white-space characters.
Declaration
public static bool IsNullOrWhiteSpace(this string self)
Parameters
Type |
Name |
Description |
String |
self |
|
Returns