ReplacePipe class

Creates a new String with some or all of the matches of a pattern replaced by a replacement.

The pattern to be matched is specified by the 'pattern' parameter.

The replacement to be set is specified by the 'replacement' parameter.

An optional 'flags' parameter can be set.

Usage

$pipe.replace(expression, pattern, replacement)

All behavior is based on the expected behavior of the JavaScript API String.prototype.replace() function.

Where the input expression is a String or Number (to be treated as a string), the pattern is a String or RegExp, the 'replacement' is a String or Function.

--Note--: The 'pattern' parameter will be converted to a RegExp instance. Make sure to escape the string properly if you are matching for regular expression special characters like parenthesis, brackets etc.

Annotations

Constructors

ReplacePipe()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transform(dynamic value, dynamic pattern, dynamic replacement) → dynamic

Operators

operator ==(Object other) bool
The equality operator.
inherited