string::replace

Returns a string corresponding to the replacement of a given string with another in the specified string.

Usage

string string::replace(str, oldValue, newValue)

Parameters

Name Type Description
str string input string
oldValue string A String to be replaced.
newValue string A String to replace all occurrences of oldValue.

Return Value

A String equivalent to str but with all instances of oldValue replaced with newValue.

Exceptions

The function will fail in any of the following circumstances:

Remarks

This function performs a word (case-sensitive and culture-sensitive) search to find oldValue.

Examples

Requirements

Assembly: NAnt.Core (0.91.4312.0)