String Class
Just a simple collection of static functions to accomplish some of the more redundant string related manipulation.
Located in /classes/String.php (line 24)
Format Phone Number
Formats a 10 digit phone number with dashes as ###-###-####.
Generate Gravatar Hash
Generates a hash from the passed string that can then be used for fetching an avatar from Gravatar.com
Is Empty
Checks if a string is empty. You can use the PHP function empty() but that returns true for a string of "0". Last I checked, that's not an empty string. PHP's function also doesn't apply trim() to the value to ensure it's not just a bunch of spaces.
Random
Generates a pseudo-random string based on the passed parameters.
Note: Similar characters = 0, O, 1, I (and may be expanded)
Truncate
Truncates a string to a specified length and (optionally) adds a span to provide a rollover to see the expanded text.
Upper Words
Applies strtolower() and ucwords() to the passed string. The exception being email addresses which are not formatted at all.
Documentation generated on Wed, 03 Oct 2012 17:46:06 -0400 by phpDocumentor 1.4.4