io.github.palexdev.mfxresources.themes.material.abstracts._utils.scss Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of materialfx-all Show documentation
Show all versions of materialfx-all Show documentation
Material Design/Modern components for JavaFX, now packed as a single Jar
@use 'sass:string';
/// Replace `$search` with `$replace` in `$string`
/// @author Kitty Giraudel
/// @param {String} $string - Initial string
/// @param {String} $search - Substring to replace
/// @param {String} $replace ('') - New value
/// @return {String} - Updated string
@function StringReplace($string, $search, $replace: '') {
$index: string.index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + StringReplace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}