src/StringExpander.cs
/// <summary>
/// Expand the string through string substitution.
/// </summary>
/// <param name="source">Source string to expand.</param>
/// <param name="options">Options for string expansion.</param>
/// <returns>Expanded string.</returns>
Expand the string through string substitution.
Expand the string through string substitution .
public static string Expand(string source, StringExpansionOptions options)
        {
            if (string.IsNullOrEmpty(source))
                return source;
            if (!source.Contains(options.VarDelimiterChar))
                return source;
            var result = new StringBuilder();
            ExpandInternal(result, source, options, 0);
            return result.ToString();
        }
public static string Expand ( string source , StringExpansionOptions options ) { if ( string . IsNullOrEmpty ( source ) ) return source ; if ( ! source . Contains ( options . VarDelimiterChar ) ) return source ; var result = new StringBuilder ( ) ; ExpandInternal ( result , source , options , 0 ) ; return result . ToString ( ) ; }
Expand the string through string substitution.
Expand the string through string substitution .
// In case of an empty string, it is returned as is. // If there are no delimiters, just return with input string. // Expand the string through string substitution.
None
source
string
Source string to expand.
Source string to expand .
options
StringExpansionOptions
Options for string expansion.
Options for string expansion .