Template:Replace/doc

From Vietnam Veterans for Factual History
Jump to navigation Jump to search

Lua error: Cannot create process: proc_open(/log/lua.error): Failed to open stream: No such file or directory Lua error: Cannot create process: proc_open(/log/lua.error): Failed to open stream: No such file or directory

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: Cannot create process: proc_open(/log/lua.error): Failed to open stream: No such file or directory
  • {{replace|One two two three two four twotwo five|two|NINE|count=2}}Lua error: Cannot create process: proc_open(/log/lua.error): Failed to open stream: No such file or directory

Space

  • {{replace|One-two two-three two-four twotwo-five|-|—}}Lua error: Cannot create process: proc_open(/log/lua.error): Failed to open stream: No such file or directory
  • {{replace|One-two two-three two-four twotwo-five|- |—}}Lua error: Cannot create process: proc_open(/log/lua.error): Failed to open stream: No such file or directory

See also

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