Template:Replace/doc

Safer nicotine wiki Tobacco Harm Reduction
Revision as of 22:23, 22 January 2021 by imported>Pppery (Add {{used in system}})
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Lua error: Internal error: The interpreter exited with status 1. Lua error: Internal error: The interpreter exited with status 1. Lua error: Internal error: The interpreter exited with status 1.

Usage

{{replace|string|target|replacement|count=n}}

Returns string with the first n occurrences of target replaced with replacement. Omitting count 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}}Lua error: Internal error: The interpreter exited with status 1.
  • {{replace|One two two three two four twotwo five|two|NINE|count=2}}Lua error: Internal error: The interpreter exited with status 1.
  • {{replace|foo_bar|_| }}Lua error: Internal error: The interpreter exited with status 1.

Space

  • {{replace|One-two two-three two-four twotwo-five|-|—}}Lua error: Internal error: The interpreter exited with status 1.
  • {{replace|One-two two-three two-four twotwo-five|- |—}}Lua error: Internal error: The interpreter exited with status 1.

See also

  • {{str rep}}, which replaces only the first occurrence of a string.


Lua error: Internal error: The interpreter exited with status 1.