String replace in Sass
问题 Sass 3.2.1 How to replace in string some part of text? For example, remove from color #fefefe a dash #, to be fefefe. Thanks! 回答1: Here is a function that I just used! SCSS-FUNCTION /// Replace `$search` with `$replace` in `$string` /// @author Hugo Giraudel /// @param {String} $string - Initial string /// @param {String} $search - Substring to replace /// @param {String} $replace ('') - New value /// @return {String} - Updated string @function str-replace($string, $search, $replace: '') {