2017 © Pedro Peláez
 

library php-string

PHP String Utilities

image

hugsbrugs/php-string

PHP String Utilities

  • Wednesday, March 15, 2017
  • by hugsbrugs
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5,981 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 25 % Grown

The README.md

php-string

This librairy provides utilities function to ease string manipulation, (*1)

Build Status Coverage Status, (*2)

Install

Install package with composer, (*3)

composer require hugsbrugs/php-string

In your PHP code, load library, (*4)

require_once __DIR__ . '/../vendor/autoload.php';
use Hug\HString\HString as HString;

Note: I couldn't use String as namespace because it's a PHP reserved word so it's why namespace is HString ..., (*5)

Usage

Replace the last occurrence of a string, (*6)

$string = HString::str_replace_last($search, $replace, $subject);

Checks whether a string starts with given chars, (*7)

$bool = HString::starts_with($haystack, $needle);

Checks whether a string ends with given chars, (*8)

$bool = HString::ends_with($haystack, $needle);

Unit Tests

phpunit --bootstrap vendor/autoload.php tests

Author

Hugo Maugey visit my website ;), (*9)

The Versions

15/03 2017

dev-master

9999999-dev

PHP String Utilities

  Sources   Download

The Development Requires

15/03 2017

0.1

0.1.0.0

PHP String Utilities

  Sources   Download

The Development Requires

15/03 2017

1.0

1.0.0.0

PHP String Utilities

  Sources   Download

The Development Requires