Capy-Bearer Documentation

replace

lib call

Capy

function replace(value : string, needle : string, replacement : string) string

Description

Use regex_replace() when the search text is a regular expression.

Parameters

value : source text

needle : literal text to replace

replacement : replacement text

Return Values

Text with every literal match replaced.

Example

Capy

print(replace("capy docs", "docs", "API"), "\n")