Login   Register  
PHP Classes
elePHPant
Icontem

Bin String: Manipulate text with mbstring extension functions

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-08-05 (4 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 138 All time: 7,567 This week: 1,398Up
Version License PHP version Categories  
bin-string 0.1GNU Lesser General Publ...5.0PHP 5, Text processing
Description Author  

This class can manipulate text with mbstring extension functions.

It can check if the mbstring extension is enabled and provides wrapper functions that use that extension functions if possible or fallback to the respective non-multibyte text function versions.

When PHP is configured to overload the mbstring functions, it can still use the original versions of those functions.

Currently it provides wrapper functions for the functions: mail, strlen, strpos, strrpos, substr, strtolower, strtoupper, substr_count, ereg, eregi, ereg_replace, eregi_replace, and split.

Innovation Award  
PHP Programming Innovation award nominee
July 2014
Number 6


Prize: One downloadable e-book of choice by O'Reilly
The PHP mbstring extension provides functions to manipulate text strings that use character set encodings that may require more than one byte per character.

This allows PHP to manipulate strings with characters in practically any alphabet. However the mbstring extension functions are slower than similar functions for single byte character strings.

This class is a wrapper to use string manipulation functions that may use mbstring functions or not, depending on whether this extension is available in the current PHP environment, and also whether the application is using a single byte or multi-byte character set encodings for its texts.

Manuel Lemos
Picture of Asbjorn Grandt
Name: Asbjorn Grandt <contact>
Classes: 8 packages by
Country: Denmark Denmark
Age: 43
All time rank: 2471 in Denmark Denmark
Week rank: 29 Up1 in Denmark Denmark Equal
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Accessible without login Plain text file BinString.Example1.php Example Example and test file
Accessible without login Plain text file BinString.Example2.php Example Example of using the new "Static" version of BinString.
Plain text file BinString.php Class Main class
Plain text file BinStringStatic.php Class Same as BinString.php, but using static functions, rather than having to be instantiated.
Accessible without login Plain text file composer.json Data Composer file for this package.
Accessible without login Plain text file readme.markdown Doc. Readme

 Version Control Reuses Unique User Downloads Download Rankings  
 100%2Total:138All time:7,567
 This week:0This week:1,398Up