2017 © Pedro Peláez
 

library string-operations

This class is a collection of functions that deals with strings

image

unreal4u/string-operations

This class is a collection of functions that deals with strings

  • Monday, November 3, 2014
  • by unreal4u
  • Repository
  • 1 Watchers
  • 3 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Latest Stable Version Build Status Scrutinizer Code Quality License, (*1)

stringOperations.php

Credits

This class is made by unreal4u (Camilo Sperberg). unreal4u.com/, (*2)

About this class

  • Originally conceived to be a receiver of all loose string-related functions that I've made throughout the years
  • Later also a playground to learn about multibyte capabilities of strings

Detailed description

This package is a collection of functions related to string manipulation., (*3)

Basic usage

include('src/unreal4u/stringOperations.php');
$stringOperations = new unreal4u\stringOperations();
$result = $stringOperations->truncate('this is a bigger text', 15);
  • Congratulations! Result will have a truncated string, compatible with UTF-8 characters:
 this is a bigger...
 
  • Please see examples and PHPUnit tests for more options and advanced usage

Composer

This class has support for Composer install. Just add the following section to your composer.json with:, (*4)

{
    "require": {
        "unreal4u/string-operations": "@stable"
    }
}

Now you can instantiate a new stringOperations class by executing:, (*5)

require('vendor/autoload.php');

$stringOperations = new unreal4u\stringOperations();

Pending

  • Search for more loose functions spattered around my codebase
  • Improve the usage of the internal used charset
  • Consistent usage of the class and it subcomponents (UTF-8 in createSlug)
  • Multiple arguments for separator in truncate function
  • Use transliterate instead of htmlentities (Will produce BC!)

Version History

  • 0.1:
    • Created class
  • 0.1.1:
    • Documentation fixes
  • 0.2.0:
    • Added decomposeCompleteEmail() function and unit tests for it
  • 0.2.2:
    • Documentation update
  • 0.3.0:
    • Composer compatibility
    • Documentation and examples update
  • 0.3.1:
    • Renamed repo and moved PHPUnit as dependency
  • 0.3.2:
    • Travis-CI support
    • Gitattributes
    • Documentation fixes
  • 1.0.0:
    • Truncate function improvements and BC breaks
      • This function can now search backwards in the string
      • This function now supports multiple separators
    • Excluded some things from the auto generated release packages
  • 1.1.0:
    • Class doesn't rely anymore on imap functions, so no more need for imap extension!
    • Update to PHPUnit 4.0
    • Added PHP 5.3 to the battery test

Contact the author

The Versions

03/11 2014

dev-master

9999999-dev

This class is a collection of functions that deals with strings

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

24/03 2014

v1.1.0

1.1.0.0

This class is a collection of functions that deals with strings

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

04/03 2014

v1.0.0

1.0.0.0

This class is a collection of functions that deals with strings

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *
  • ext-imap *

 

The Development Requires

27/02 2014

v0.3.2

0.3.2.0

This class is a collection of functions that deals with strings

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *
  • ext-imap *

 

The Development Requires

05/02 2014

v0.3.1

0.3.1.0

This class is a collection of functions that deals with strings

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *
  • ext-imap *

 

The Development Requires

27/12 2013

v0.3.0

0.3.0.0

This class is a collection of functions that deals with strings

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *
  • ext-imap *

 

The Development Requires