mirror of https://github.com/vizality/vizality
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
470 B
17 lines
470 B
@use 'str-replace' as *;
|
|
|
|
/// Replaces a substring within each string in a list.
|
|
/// @param {list} $strings List of strings.
|
|
/// @param {string} $search Substring.
|
|
/// @param {string} $replace Replacement.
|
|
/// @return {list} Updated list of strings.
|
|
@function str-replace-all($strings, $search, $replace: '') {
|
|
|
|
@each $string in $strings {
|
|
$strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));
|
|
}
|
|
|
|
@return $strings;
|
|
|
|
}
|