feat(RegExpWrapper): implement a test method

This commit is contained in:
Victor Berchet
2015-05-26 13:34:11 +02:00
parent 1dc8ba6920
commit 551586ced0
3 changed files with 13 additions and 2 deletions

View File

@ -137,6 +137,9 @@ class RegExpWrapper {
static Match firstMatch(RegExp regExp, String input) {
return regExp.firstMatch(input);
}
static bool test(RegExp regExp, String input) {
return regExp.hasMatch(input);
}
static Iterator<Match> matcher(RegExp regExp, String input) {
return regExp.allMatches(input).iterator;
}