### File

`projects/app-base-library/src/lib/angular/pipes/replace-all.pipe.ts`

### Metadata

name | replaceAll

### Methods

transform
`transform(value: string, stringToReplace: string, replacement: string, ignoreCase: boolean)`
Defined in projects/app-base-library/src/lib/angular/pipes/replace-all.pipe.ts:8

Parameters :

Name | Type | Optional | Default value
value | `string` | no |
stringToReplace | `string` | no |
replacement | `string` | no |
ignoreCase | `boolean` | no | `false`

Returns : `any`

    import { Pipe, PipeTransform } from '@angular/core';

    @Pipe({
      name: 'replaceAll'
    })
    export class ReplaceAllPipe implements PipeTransform {

      transform(value: string, stringToReplace: string, replacement: string, ignoreCase: boolean = false ): any {
        if (!value) {
          return value;
        }
        function replaceAll(src, str1, str2, ignore) {
            return String(src).replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g, '\\$&'), (ignore ? 'gi' : 'g')), (typeof(str2) === 'string') ? str2.replace(/\$/g, '$$$$') : str2);
        }
        return replaceAll(value, stringToReplace, replacement, ignoreCase);
      }

    }

# results matching ""

# No results matching ""