MutableString class
class MutableString implements StringContainer {
String string;
MutableString(this.string);
@override
Iterable<MutableStringMatch> allMatches(RegExp regExp) {
return new MutableStringMatchesIterable(this,regExp);
}
@override
Iterable<MutableStringMatch> allMatchesFromMultiRegExp(MultiRegExp multiRegExp) {
return new MutableStringMatchesIterable(this,multiRegExp);
}
String substring(int startIndex, [int endIndex]) {
return string = string.substring(startIndex, endIndex);
}
String trim() => string = string.trim();
String replacePart(int startIndex, int endIndex, [String replacement = '']) {
return string = string.substring(0,startIndex)
+ replacement
+ string.substring(endIndex);
}
}
Implements
Constructors
new MutableString(String string) #
Creates a new Object instance.
Object instances have no meaningful state, and are only useful
through their identity. An Object instance is equal to itself
only.
docs inherited from Object
MutableString(this.string);
Properties
String string #
String string
Methods
Iterable<MutableStringMatch> allMatches(RegExp regExp) #
@override
Iterable<MutableStringMatch> allMatches(RegExp regExp) {
return new MutableStringMatchesIterable(this,regExp);
}
Iterable<MutableStringMatch> allMatchesFromMultiRegExp(MultiRegExp multiRegExp) #
@override
Iterable<MutableStringMatch> allMatchesFromMultiRegExp(MultiRegExp multiRegExp) {
return new MutableStringMatchesIterable(this,multiRegExp);
}
String replacePart(int startIndex, int endIndex, [String replacement = '']) #
String replacePart(int startIndex, int endIndex, [String replacement = '']) {
return string = string.substring(0,startIndex)
+ replacement
+ string.substring(endIndex);
}
String substring(int startIndex, [int endIndex]) #
String substring(int startIndex, [int endIndex]) {
return string = string.substring(startIndex, endIndex);
}
String trim() #
String trim() => string = string.trim();