string-replace

Description

Replaces item in string with new string (similar to PHP's preg_replace).

SCSS Usage

string-replace($string, $search, $replace)
Parameter Required? Value
$string Yes String to search and replace within
$search Yes Item to replace
$replace Yes What to replace with

And so, in SCSS:

_component.scss
.foo::before {
  content: str-replace('foo bar baz', 'baz', 'qux');
}

Output

app.css
.foo::before {
  content: str-replace('foo bar baz', 'baz', 'qux');
}