/*
 * Replace $old occurrences by $new in $string respecting $case-sensitive
 * ---
 * @access private
 * ---
 * @since 1.2.0
 * ---
 * @param {string} $string         - string
 * @param {string} $old            - old substring to replace by $new
 * @param {string} $new            - new substring to replace $old
 * @param {bool}   $case-sensitive - case-sensitivity
 * ---
 * @return {string}
 */

@function _ss-str-replace($string, $old, $new: '', $case-sensitive: true) {
  $index: if(not $case-sensitive, str-index(to-lower-case($string), to-lower-case($old)),  str-index($string, $old));

  @if $index and $new != $old {
    $result: if($index != 1, quote(str-slice($string, 1, $index - 1)), '');

    @for $i from $index through str-length($string) {
      @if $i < $index or $i >= $index + str-length($old) {
        $result: $result + str-slice($string, $i, $i);
      }
    }

    @return quote(str-replace(str-insert($result, $new, $index), $old, $new, $case-sensitive)); 
  }

  @return $string;
}


/*
 * Replace $old occurrences by $new in $string respecting $case-sensitive
 * ---
 * @access private
 * ---
 * @since 1.2.0
 * ---
 * @param {string} $string         - string
 * @param {string} $old            - old substring to replace by $new
 * @param {string} $new            - new substring to replace $old
 * @param {bool}   $case-sensitive - case-sensitivity
 * ---
 * @return {string}
 */

@function _ss-str-replace($string, $old, $new: '', $case-sensitive: true) {
  $index: if(not $case-sensitive, str-index(to-lower-case($string), to-lower-case($old)),  str-index($string, $old));

  @if $index and $new != $old {
    $result: if($index != 1, quote(str-slice($string, 1, $index - 1)), '');

    @for $i from $index through str-length($string) {
      @if $i < $index or $i >= $index + str-length($old) {
        $result: $result + str-slice($string, $i, $i);
      }
    }

    @return quote(_ss-str-replace(str-insert($result, $new, $index), $old, $new, $case-sensitive)); 
  }

  @return $string;
}


Fix error when only using private functions
Fix error when only using private functions