Utility Function for Matching a Closing Brace

Share:

Description

Given positions of opening and closing braces match_brace identifies the closing brace matching the first opening brace.

Usage

1
match_brace(opening, closing)

Arguments

opening

integer: Vector with positions of opening braces.

closing

integer: Vector with positions of closing braces.

Value

Integer with the posision of the matching brace.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.