PHP Classes

CompareStr: Compare strings to find which characters changed

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-02-06 (1 month ago) RSS 2.0 feedNot enough user ratingsTotal: 87 This week: 1All time: 8,955 This week: 533Up
Version License PHP version Categories
comparestr 1.0GNU General Publi...5Algorithms, PHP 5, Text processing
Description Author

This class can compare strings to find which characters changed.

It takes two strings and traverse the list of their characters to find which characters were changed.

The class returns the changed characters and the respective positions.

  Performance   Level  
Name: Ovunc Tukenmez <contact>
Classes: 12 packages by
Country: Turkey Turkey
Age: 31
All time rank: 80614 in Turkey Turkey
Week rank: 273 Up3 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 5x


CompareStr PHP Class

<strong>CompareStr</strong> is a <strong>PHP</strong> class that can be used to can find number of changed chars as well as indexes of commonly used sequenced chars between two strings.

Example script is included in the package. (example.php)<br /> <h2>Sample Output <ul> <li> Old string: 285427<br> New string: 296427<br> Number of changes: 2<br> Commonly used sequenced chars count: 4<br> <br> <b>2</b>85<b>4</b><b>2</b><b>7</b><br> <b>2</b>96<b>4</b><b>2</b><b>7</b> </li> </ul>

<h2>Public Methods of Class</h2> <ul> <li>setOldString()</li> <li>getOldString()</li> <li>setNewString()</li> <li>getNewString()</li> <li>compare()</li> </ul>

<h2>Class Requirements</h2> <ul> <li>PHP 5 >= 5.5.0</li> </ul>

Thanks for checking out this class! If you have improvement idea or bug fix, please contribute this class.<br /> <br /> <br /> Ovunc Tukenmez

  Files folder image Files  
File Role Description
Plain text file CompareStr.php Class Class source
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:8,955
This week:533Up