# Timeline for Looping through a string finding nested brackets

### Current License: CC BY-SA 4.0

4 events
when toggle format what by license comment
Aug 12 '18 at 17:04 comment @AlexM. No particular reason - either way will work. It's like asking whether you should open the large end or the small end of an egg first. No problem, I'm glad to have been able to provide an alternate approach. I find that IEnumerable generators lend themselves well to parsing thanks to their linearity and laziness. I've previously used them for tokenising strings and as I say, the range of LINQ operators is incredibly useful (filtering, transforming, grouping etc).
Aug 12 '18 at 16:40 comment Apologies for late comment: Why not just flip var depth = startPositions.Count - 1; var start = startPositions.Pop(); so that the depth after the pop is simply startPositions.Count? Otherwise, this answer is great and in-depth! Thank you!
Aug 12 '18 at 12:21 history edited