PHP Classes

PHP Indentation Tool: Add or remove text to indent and unindent strings

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files Documentation   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-03-19 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 178 All time: 7,558 This week: 1,449Up
Version License PHP version Categories  
indentation 1.3GNU Lesser Genera...5.0PHP 5, Text processing
Description Author  

This class can add or remove text to indent and unindent strings.

It can take a text with eventually with multiple lines and insert white space characters to beginning of each line so the whole lines appear advanced relatively to the beginning of each line.

The class can also indent just a specific line of a text string.

It can as well take a text string with indented lines and remove all the white space characters that is common to the beginning of each line.

The class even traverse the lines of a text string and return the indentation level of all the lines.

Innovation Award  
PHP Programming Innovation award nominee
March 2014
Number 6
Indenting and unindenting text is a task that is necessary sometimes, for instance to add or remove quoted text from email messages.

This class implements a solution that can do either indenting and unindenting tasks of any text string.

Manuel Lemos
Picture of Roger Baklund
Name: Roger Baklund is available for providing paid consulting. Contact Roger Baklund .
Classes: 6 packages by
Country: Norway Norway
Age: 48
All time rank: 19917 in Norway Norway
Week rank: 1592 Up8 in Norway Norway Down
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file Indentation.class.php Class class definition
Accessible without login Plain text file Doc. doc

 Version Control Unique User Downloads Download Rankings  
 100%Total:178All time:7,558
 This week:0This week:1,449Up