2017 © Pedro Peláez
 

library brackets-checker

Simple library for brackets checking in strings

image

maxvoronov/brackets-checker

Simple library for brackets checking in strings

  • Monday, January 15, 2018
  • by Amirax
  • Repository
  • 1 Watchers
  • 2 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Brackets Checker

Latest Version Software License Build Status Codacy grade, (*1)

Install

The preferred way to install this extension is through composer:, (*2)

composer require maxvoronov/brackets-checker

Usage

This package based on pure PHP. Library can check the correctness of the brackets sentence., (*3)

use MaxVoronov\BracketsChecker\Checker;

$bracketsChecker = new Checker();
$bracketsChecker->check("(( ))( )");    // Returns true
$bracketsChecker->check("() )");        // Returns false

Also you can check custom brackets pairs and available filtering symbols:, (*4)

$brackets = ["(" => ")", "[" => "]", "<" => ">"];
$availableChars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "-", "*", "/", " "];

$bracketsChecker = new Checker($brackets, $availableChars);
$bracketsChecker->check("([2 + 3] * <10> / (9 - 4)))");    // Returns true

Testing

composer test

License

The MIT License (MIT). Please see License File for more information., (*5)

The Versions

15/01 2018

dev-master

9999999-dev https://github.com/maxvoronov/brackets-checker

Simple library for brackets checking in strings

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

checker brackets parenthesis otus homework

15/01 2018

1.0.0

1.0.0.0 https://github.com/maxvoronov/brackets-checker

Simple library for brackets checking in strings

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

checker brackets parenthesis otus homework

27/12 2017

0.1.0

0.1.0.0 https://github.com/maxvoronov/brackets-checker

Simple library for brackets checking in strings

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

checker brackets parenthesis otus homework