This documentation is transcluded from Template:Replace/doc. (edit | history) Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Returns string with the first n occurrences of target replaced with replacement. Omitting Template:Code will replace all occurrences. Space counts as a character if placed in any of the first three parameters.