Jump to content

Balanced brackets: Difference between revisions

(→‎{{header|Perl}}: also Regexp::Common::balanced)
Line 1,671:
 
func testBalanced(s string) {
fmt.PrintfPrint("%s: + ",: s")
var open int:= 0
for i_,c := 0;range i < len(s); i++ {
switch s[i]c {
case '[':
open++
Line 1,681:
fmt.Println("not ok")
return
 
}
open--
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.