Was this page helpful?

ReplaceWithinDelimiters Extension Method

    ReplaceWithinDelimiters(this string text, string startDelimiter, string endDelimiter, string replace, StringComparison comparison)

    public static string ReplaceWithinDelimiters(this string text, string startDelimiter, string endDelimiter, string replace, StringComparison comparison);
    Replace the contents between delimiters

    Parameters

    Name Type Description
    text string Source text.
    startDelimiter string Delimiter demarking the beginning of the string to be replaced.
    endDelimiter string Delimiter demarking the end of the string to replaced.
    replace string The value to replace the value between the delimters with.
    comparison StringComparison The type of string comparison to use to match delimiters.

    Returns

    Type: string
    String with delimited text replaced.

    ReplaceWithinDelimiters(this string text, string startDelimiter, string endDelimiter, Converter<string,string> callback, StringComparison comparison)

    public static string ReplaceWithinDelimiters(this string text, string startDelimiter, string endDelimiter, Converter<string,string> callback, StringComparison comparison);
    Replace the contents between delimiters

    Parameters

    Name Type Description
    text string Source text.
    startDelimiter string Delimiter demarking the beginning of the string to be replaced.
    endDelimiter string Delimiter demarking the end of the string to replaced.
    callback Converter<string,string> Callback for converting the text between delimiters into its replacement text.
    comparison StringComparison The type of string comparison to use to match delimiters.

    Returns

    Type: string
    String with delimited text replaced.
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by