Balanced brackets: Difference between revisions
m
Fixed bug
(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag) |
m (Fixed bug) |
||
Line 3,335:
include "NSLog.incl"
local fn BracketBalance(
NSInteger i, bracketTracker = 0
CFStringRef result
Line 3,341:
CFCharacterSetRef bracketSet = fn CharacterSetWithCharactersInString( @"[]" )
CFCharacterSetRef bracketsOnlySet = fn CharacterSetInvertedSet( bracketSet )
CFStringRef trimmedStr = fn ArrayComponentsJoinedByString( trimmedSArray, @"" )
NSUInteger strLen = len( trimmedStr )
|