public class ParenthesisUtil extends Object
| Constructor and Description |
|---|
ParenthesisUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getMatchingParenthesisIndex(CharSequence selector,
int index)
Given an index of an opening parenthesis "(", find the matching closing parenthesis ")".
|
public static int getMatchingParenthesisIndex(CharSequence selector, int index) throws ParseSelectorException
getMatchingParenthesis("a(b(c))", 1) returns 6
getMatchingParenthesis("a(b(c))", 3) returns 5
selector - String to analyze for the matching selectorindex - Index of the opening parenthesis to matchParseSelectorExceptionCopyright © 2014. All Rights Reserved.