Jump to content

Template:Replace

From SeptemWiki
Revision as of 17:11, 9 April 2016 by Shawn (talk | contribs) (Created page with "{{#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|count={{{count|}}}}}<noinclude> {{documentation}} </noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Script error: No such module "String".

Documentation for Template:Replace[view] [edit] [history]

Usage

Template:((replace|string|target|replacement[|count=n]}}

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.

Examples

  • {{replace|One two two three two four twotwo five|two|NINE}}Script error: No such module "String".
  • {{replace|One two two three two four twotwo five|two|NINE|count=2}}Script error: No such module "String".

Space

  • {{replace|One-two two-three two-four twotwo-five|-|—}}Script error: No such module "String".
  • {{replace|One-two two-three two-four twotwo-five|- |—}}Script error: No such module "String".

See also

  • Template:Tl, which replaces only the first occurrence of a string.


Template:String-handling templates

Pages that use this Template
Templates that use this Template