A tiny library that checks whether brackets are balanced or not. It supports ()[]{}
, any other character is ignored by default. E.x.:
({})
-> true([a]())
-> true([)]
-> false
- Import in your project
github.com/RicardoBeltranRamirez/pkg/parser
. - Then, you can check with
parser.AreBracketsBalanced(val)
whereval
is a string value.