Replace(input, replaceWith, startAt, maxReplace) Replace(input, replaceWith, startAt, maxReplace) ThenExpect(exceptionGenerator, comparer, elements) ThenExpect(exceptionGenerator, comparer, elements) Throw(exceptionGenerator)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Method: T[] replace(T[], int, Func<int, TMatch, IEnumerable<T>>, int?, bool)- Declared in: RT.Generexes.GenerexBase<T, TMatch, TGenerex, TGenerexMatch>
Declarationprotected T[] replace(
T[] input,
int startAt,
Func<int, TMatch, IEnumerable<T>> replaceWith,
int? maxReplace,
bool backward
) Summary
Performs replacements of the non-overlapping matches of the current regular expression within the specified
input array. ParametersT[] | input |
The input array to match against. | int | startAt |
Index at which to start the search. Depending on backward, the matching behaviour is like
that of GenerexBase<T, TMatch, TGenerex, TGenerexMatch>.Matches(T[], int) or GenerexBase<T, TMatch, TGenerex, TGenerexMatch>.MatchesReverse(T[], int?). | Func<int, TMatch, IEnumerable<T>> | replaceWith |
Delegate that determines what to replace each match with. | int? | maxReplace |
Maximum number of replacements to make, or null for unlimited. | bool | backward | true to perform a reverse match (starting from the end of the array and going backwards); false
to match forward. |
Returns
The new array with the replacements performed. |