add SubText.groupCount()

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30578 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
mindless committed 2010-04-30 21:09:41 +00:00
1 parent cd8376e9b4
commit a6e6c7946a
2 files changed
+11 -1

No files matched your search

@@ -181,6 +181,14 @@ public class MarkupText extends AbstractMarkupText {
return text.substring(start(groupIndex),end(groupIndex));
}
/**
* How many captured groups are in this subtext.
* @since 1.357
*/
public int groupCount() {
return groups.length / 2;
}
/**
* Replaces the group tokens like "$0", "$1", and etc with their actual matches.
*/