Skip to content
/ mbstring Public

Methods for handling multibyte string manipulations.

License

Notifications You must be signed in to change notification settings

jpuck/mbstring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multibyte string methods

Methods for handling multibyte string manipulations.

Build Status Codecov

Installation

via composer:

composer require jpuck/mbstring

Usage

See the tests for more examples.

Case Map

Creates an index of uppercase character positions in a string that can be mapped to other strings.

$original = '🔥 Foó, foó FOÓ 😁';
$casemap = new CaseMap($original);
$replaced = mb_eregi_replace('foó', 'bår', $original);
$restored = $casemap->transform($replaced);

echo "original: $original\n";
echo "replaced: $replaced\n";
echo "restored: $restored\n";
original: 🔥 Foó, foó FOÓ 😁  
replaced: 🔥 bår, bår bår 😁  
restored: 🔥 Bår, bår BÅR 😁  

About

Methods for handling multibyte string manipulations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages