Get position of paired brackets in a string

Get position of the other paired bracket (nested) in a string
33 Downloads
Aktualisiert 22 Jan 2019

Lizenz anzeigen

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

Zitieren als

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. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2018b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0