Text processing: Text Helper Class
Chris Lam (contact me)
This class can be used to perform several types of text processing operations. It can:
- Capitalize the first letter of all words of string
- Count the number of non-whitespace characters, words, sentences in a string
- Encode strings for displaying as HTML, in URLs, escaping quotes, as hexadecimal, as Javascript strings, and obfuscate e-mail addresses
- Exclude given words from a string
- Highlight PHP code
- Indent strings
- Limit the length of a string in number or words or characters
- Strip consecutive whitespace characters
- Word wrap strings
Click here for detailed information about this class on phpclasses.org