Class StringExtensions
Namespace: CapyKit.Extensions
Assembly: CapyKit.dll
Provides static extentions methods for providing additional functionality for System.String types.
public static class StringExtensions
Inheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
ObjectExtensions.UpdateProperties(object, object)
Methods
IfNullOrEmpty(string, string)
Replaces a null or empty string with a specified replacement string.
public static string IfNullOrEmpty(this string value, string replacement)
Parameters
value string
The original string.
replacement string
The replacement string.
Returns
The original string if not null or empty, otherwise the replacement string.
See Also
IfNullOrWhiteSpace(string, string)
Replaces a null or whitespace string with a specified replacement string.
public static string IfNullOrWhiteSpace(this string value, string replacement)
Parameters
value string
The original string.
replacement string
The replacement string.
Returns
The original string if not null or whitespace, otherwise the replacement string.