Returns index of closing/openinig bracket of the provided bracket
T is data type of each element (usually char in case of searching in strings)
forward if true, then the search is in forward direction, i.e, the closing bracket is searched for
opening is the array of elements that are to be considered as opening brackets
closing is the array of elements that are to be considered as closing brackets. Must be in same order as openings is the array to search in
index is the index of the opposite bracket
Returns index of closing/openinig bracket of the provided bracket
T is data type of each element (usually char in case of searching in strings) forward if true, then the search is in forward direction, i.e, the closing bracket is searched for opening is the array of elements that are to be considered as opening brackets closing is the array of elements that are to be considered as closing brackets. Must be in same order as opening s is the array to search in index is the index of the opposite bracket