f1r3starter/brackets

Yet another composer package

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/f1r3starter/brackets

dev-master 2018-07-06 14:03 UTC

This package is auto-updated.

Last update: 2025-09-19 08:51:25 UTC


README

Library for solving the problem of the correct brackets closing

Installation:

composer require f1r3starter/brackets

Using:

For using run:

<?php

use brackets\Brackets;

$bracketsString = '((()))';
$solver = new Brackets($bracketsString);
var_dump($solver->isCorrect());

If you need to use square brackets:


$solver->setOpenBracket('[');
$solver->setCloseBracket(']');

If you need to change the list of the allowed characters (note that special characters should be escaped with backslash ('\') symbol):


$solver->setAllowedSymbols('a', 'b', 'c', '1', '\%', '\$');