All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.palexdev.mfxresources.themes.material.abstracts._utils.scss Maven / Gradle / Ivy

There is a newer version: 11.26.0
Show newest version
@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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy