Class StringExtensions
Extension methods for System.String.
Inheritance
StringExtensions
Assembly: Unity.Tutorials.Core.Editor.dll
Syntax
public static class StringExtensions
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