2017 © Pedro Peláez
 

library violin

A multibyte string manipulation library focused on performance.

image

bentools/violin

A multibyte string manipulation library focused on performance.

  • Wednesday, July 18, 2018
  • by bpolaszek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Latest Stable Version License Build Status Coverage Status Quality Score Total Downloads, (*1)

Violin 🎻

Violin is a multibyte-compliant, OOP string manipulation library., (*2)

It is heavily inspired by Stringy, with a main focus on performance: when dealing with thousands of strings, it is sometimes counter-productive to rely on mb_* functions, which perform up to 4 times slower than normal str_* functions, when you manipulate ASCII strings., (*3)

Violin will detect the string's encoding, then decide wether or not to use the mbstring extension (or the Symfony polyfill if the extension is not loaded)., (*4)

Installation

PHP 7.1+ is required., (*5)

composer require bentools/violin 1.0.x-dev

Tests

./vendor/bin/phpunit

Usage

use BenTools\Violin\Violin;

$str = 'fòöbàř     🤗';
print Violin::tune($str)
        ->toUpperCase()
        ->ensureLeft('Welcome ')
        ->collapseWhitespace(); // Welcome FÒÖBÀŘ 🤗

License

MIT, (*6)

The Versions

18/07 2018

dev-master

9999999-dev

A multibyte string manipulation library focused on performance.

  Sources   Download

MIT

The Requires

 

The Development Requires

strings utf-8 manipulation string oop ascii str multibyte utf8 mbstring