PHP Classes

Bin String: Manipulate text with mbstring extension functions

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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 (9 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 146 This week: 6All time: 7,677 This week: 215Up
Version License PHP version Categories  
bin-string 0.1GNU Lesser Genera...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: 9 packages by
Country: Denmark Denmark
Age: 43
All time rank: 2311 in Denmark Denmark
Week rank: 5 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:146All time:7,677
 This week:6This week:215Up