Get position of paired brackets in a string
POS2 = GETBRACKETPAIRpos1(STR,POS1) gets the bracket pos1ition in a
string given the position of the other paired bracket.
Input:
STR : string (can be a nested string)
POS1: pos1ition of a bracket (can be either left or right)
Note:
1. Any bracket of '{[(<>)]}' can be recognized.
2. Input position can be either left or right bracket.
3. Mixed pair types are sup
Cite As
Newport Quantitative (2024). Get position of paired brackets in a string (https://www.mathworks.com/matlabcentral/fileexchange/70060-get-position-of-paired-brackets-in-a-string), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |