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

@Pipe({
  name: 'strReplace'
})
export class StrReplacePipe implements PipeTransform {


  //将value中的str字符替换为result字符
  transform(value: any, str:any, result: any ) {
    if(value) {
      return value.replace(str, result);
    }
    return "";
  }


}
