laravel/laravel — pull request #1246 by matthew-muscat (2012-09-19 23:12:52+00:00)
Title: Added custom macros to Str Class

Added the ability to use custom macros for the Str Class

for example... can be used to add possessive form conversion to a string

````php
Str::macro('possessive', function($value)
{
// append an apostrophe to indicate possession
$value .= '\'';

// append an s for all strings that do not end with the letter s
if($value[Str::length($value)-2] != 's')
$value .= 's';

return $value;
});
````