CapyKit Documentation
  • Introduction
  • Getting Started
  • API Reference
    • CapyKit
      • CapyEventArgs
      • CapyEventHandler
      • CapyEventReporter
      • Color
      • EncryptedValue<T>
      • EventLevel
      • IPasswordAlgorithm
      • NamedColor
      • Password
      • Pbkdf2Algorithm
      • PoolItem<T>
      • Pool<T>
      • PropertyComparer<T, U>
    • CapyKit.Attributes
      • EnumerationAttribute<T>
      • EnumerationDescriptionAttribute
      • ValueFormatAttribute
    • CapyKit.Enumerations
      • MeasurementSystem
    • CapyKit.Extensions
      • EnumerationExtensions
      • LINQExtensions
      • ObjectExtensions
      • StringExtensions
    • CapyKit.Helpers
      • CalculationHelper
      • CompressionHelper
      • EncryptionHelper
      • IEncryptionAlgorithm
      • KeyHelper
      • LanguageHelper
      • SecurityHelper
      • SerializationHelper
      • SettingsHelper
      • ValidCharacterCollection
Search Results for

    Show / Hide Table of Contents
    • Introduction
    • Getting Started
    • API Reference
      • CapyKit
        • CapyEventArgs
        • CapyEventHandler
        • CapyEventReporter
        • Color
        • EncryptedValue<T>
        • EventLevel
        • IPasswordAlgorithm
        • NamedColor
        • Password
        • Pbkdf2Algorithm
        • PoolItem<T>
        • Pool<T>
        • PropertyComparer<T, U>
      • CapyKit.Attributes
        • EnumerationAttribute<T>
        • EnumerationDescriptionAttribute
        • ValueFormatAttribute
      • CapyKit.Enumerations
        • MeasurementSystem
      • CapyKit.Extensions
        • EnumerationExtensions
        • LINQExtensions
        • ObjectExtensions
        • StringExtensions
      • CapyKit.Helpers
        • CalculationHelper
        • CompressionHelper
        • EncryptionHelper
        • IEncryptionAlgorithm
        • KeyHelper
        • LanguageHelper
        • SecurityHelper
        • SerializationHelper
        • SettingsHelper
        • ValidCharacterCollection

    Class StringExtensions

    Provides static extentions methods for providing additional functionality for string types.

    Inheritance
    object
    StringExtensions
    Namespace: CapyKit.Extensions
    Assembly: CapyKit.dll
    Syntax
    public static class StringExtensions

    Methods

    IfNullOrEmpty(string, string)

    Replaces a null or empty string with a specified replacement string.

    Declaration
    public static string IfNullOrEmpty(this string value, string replacement)
    Parameters
    Type Name Description
    string value

    The original string.

    string replacement

    The replacement string.

    Returns
    Type Description
    string

    The original string if not null or empty, otherwise the replacement string.

    See Also
    IsNullOrEmpty(string)

    IfNullOrWhiteSpace(string, string)

    Replaces a null or whitespace string with a specified replacement string.

    Declaration
    public static string IfNullOrWhiteSpace(this string value, string replacement)
    Parameters
    Type Name Description
    string value

    The original string.

    string replacement

    The replacement string.

    Returns
    Type Description
    string

    The original string if not null or whitespace, otherwise the replacement string.

    See Also
    IsNullOrWhiteSpace(string)
    In this article
    Back to top Generated by DocFX