A port of Laravel 3's Str class