library bracket-checker
Check string for correct brackets opening/closing
shumik/bracket-checker
Check string for correct brackets opening/closing
- Sunday, July 15, 2018
- by shumik
- Repository
- 0 Watchers
- 0 Stars
- 43 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Library for checking valid brackets depth in string.
Install:, (*1)
composer require shumik/bracket-checker
Example:, (*2)
use \BracketChecker\BracketChecker;
require_once 'vendor/autoload.php';
$checker = new BracketChecker();
$checker->setString("()()(()(()())))");
try {
echo $checker->check() ? 'valid string' : 'invalid string';
} catch (InvalidArgumentException $e) {
echo 'Invalid string format';
}
Tests:, (*3)
vendor/bin/phpunit --bootstrap vendor/autoload.php vendor/shumik/bracket-checker/tests/BracketCheckerTest.php
dev-master
9999999-dev
Check string for correct brackets opening/closing
Sources
Download
MIT
The Requires
The Development Requires
by
Igor Ivanov
v1.0.7
1.0.7.0
Check string for correct brackets opening/closing
Sources
Download
MIT
The Requires
The Development Requires
by
Igor Ivanov
1.0.6
1.0.6.0
Check string for correct brackets opening/closing
Sources
Download
MIT
The Requires
The Development Requires
by
Igor Ivanov