Disallowed Character Terminated String
Overview
A given string will be terminated when reaching the first of one or more specified
terminating characters., (*1)
Useful when stripping out end-of-line comments or when discarding whatever follows
a line return., (*2)
Example Usage
<?php
use webignition\DisallowedCharacterTerminatedString\TerminatedString;
$string = new TerminatedString('value #comment', ['#']);
$this->assertEquals('value ', $string->get());
Installation and Updating
composer require webignition/disallowed-character-terminated-string
composer update webignition/disallowed-character-terminated-string
Testing
To run tests:, (*3)
composer test
, (*4)
To run code quality checks:, (*5)
composer cs
, (*6)
To run static analysis:, (*7)
composer static-analysis
, (*8)
To run all test and analyses:, (*9)
composer ci
, (*10)
Have look at the [project on travis][4] for the latest build status, or give the tests
a go yourself., (*11)