Download .zip |
Info | Documentation | View files (14) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2018-05-11 (4 months ago) | Not yet rated by the users | Total: 135 | All time: 8,727 This week: 378 |
Version | License | PHP version | Categories | |||
php-str 1.1.4 | MIT/X Consortium ... | 5.6 | PHP 5, Text processing, Data types |
Description | Author | |
This is a very simple class can manipulate text strings in several ways. |
PHP library for string handler.
This library is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.
The preferred way to install this extension is through Composer.
To install PHP Str library, simply:
$ composer require Josantonius/Str
The previous command will only install the necessary files, if you prefer to download the entire source code you can use:
$ composer require Josantonius/Str --prefer-source
You can also clone the complete repository with Git:
$ git clone https://github.com/Josantonius/PHP-Str.git
Or install it manually:
$ wget https://raw.githubusercontent.com/Josantonius/PHP-Str/master/src/Str.php
Str::startsWith($search, $string);
| Attribute | Description | Type | Required | Default | --- | --- | --- | --- | --- | | $search | The string to search. | string | Yes | | | $string | The string where search. | string | Yes | |
# Return (boolean)
Str::endsWith($search, $string);
| Attribute | Description | Type | Required | Default | --- | --- | --- | --- | --- | | $search | The string to search. | string | Yes | | | $string | The string where search. | string | Yes | |
# Return (boolean)
To use this library with Composer:
require __DIR__ . '/vendor/autoload.php';
use Josantonius\Str\Str;
Or If you installed it manually, use it:
require_once __DIR__ . '/Str.php';
use Josantonius\Str\Str;
Example of use for this library:
Str::startsWith("Hello", "Hello world");
Str::endsWith("world", "Hello World");
To run tests you just need composer and to execute the following:
$ git clone https://github.com/Josantonius/PHP-Str.git
$ cd PHP-Str
$ composer install
Run unit tests with PHPUnit:
$ composer phpunit
Run PSR2 code standard tests with PHPCS:
$ composer phpcs
Run PHP Mess Detector tests to detect inconsistencies in code style:
$ composer phpmd
Run all previous tests:
$ composer tests
If you would like to help, please take a look at the list of issues or the To Do checklist.
Pull requests
composer install
to install the dependencies.
This will also install the dev dependencies.composer fix
to excute code standard fixers.The file structure from this repository was created with PHP-Skeleton.
This project is licensed under MIT license. See the LICENSE file for more info.
2017 - 2018 Josantonius, josantonius.com
If you find it useful, let me know :wink:
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 file) | ||||
tests (1 file) | ||||
.editorconfig | Data | Auxiliary data | ||
.php_cs.dist | Example | Example script | ||
.travis.yml | Data | Auxiliary data | ||
CHANGELOG.md | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
CONDUCT.md | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpcs.xml | Data | Auxiliary data | ||
phpmd.xml | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
README-ES.md | Doc. | Documentation | ||
README.md | Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.