Пример #1
0
 /// <summary>
 /// Returns a copy of this string with text replaced using a regular expression and a
 /// replacement function.
 /// </summary>
 /// <param name="thisObj"> The string that is being operated on. </param>
 /// <param name="regExp"> The regular expression to search for. </param>
 /// <param name="replaceFunction"> A function that is called to produce the text to replace
 /// for every successful match. </param>
 /// <returns> A copy of this string with text replaced using a regular expression. </returns>
 internal static string Replace(string thisObj, RegExp regExp, FunctionInstance replaceFunction)
 {
     return(regExp.Replace(thisObj, replaceFunction));
 }
Пример #2
0
 /// <summary>
 /// Returns a copy of this string with text replaced using a regular expression.
 /// </summary>
 /// <param name="thisObj"> The string that is being operated on. </param>
 /// <param name="regExp"> The regular expression to search for. </param>
 /// <param name="replaceText"> A string containing the text to replace for every successful match. </param>
 /// <returns> A copy of this string with text replaced using a regular expression. </returns>
 internal static string Replace(string thisObj, RegExp regExp, string replaceText)
 {
     return(regExp.Replace(thisObj, replaceText));
 }