CSharpTest.Net
Transform Method
See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Utils Namespace > StringUtils Class : Transform Method

input
The text to perform the replacement upon
pattern
The regex used to perform the match
fnReplace
A delegate that selects the appropriate replacement text

Glossary Item Box

Used for text-template transformation where a regex match is replaced in the input string.

Syntax

Visual Basic (Declaration) 
Public Shared Function Transform( _
   ByVal input As String, _
   ByVal pattern As Regex, _
   ByVal fnReplace As Converter(Of Match,String) _
) As String
C# 
public static string Transform( 
   string input,
   Regex pattern,
   Converter<Match,string> fnReplace
)

Parameters

input
The text to perform the replacement upon
pattern
The regex used to perform the match
fnReplace
A delegate that selects the appropriate replacement text

Return Value

The newly formed text after all replacements are made

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys