2 * Replace `$search` with `$replace` in `$string`
3 * @author Hugo Giraudel
4 * @param {String} $string - Initial string
5 * @param {String} $search - Substring to replace
6 * @param {String} $replace ('') - New value
7 * @return {String} - Updated string
9 @function str-replace($string, $search, $replace: '') {
10 $index: str-index($string, $search);
13 @return str-slice($string, 1, $index - 1) + $replace +
14 str-replace(str-slice($string, $index + str-length($search)), $search, $replace);