Download the PHP package boomdraw/laravel-str without Composer
On this page you can find all versions of the php package boomdraw/laravel-str. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-str
Laravel Str Helper
A package that extends \Illuminate\Support\Str
with additional string helpers
Installation
Via Composer
Laravel
The package will automatically register itself.
Lumen
Register StrServiceProvider
Usage and methods
between
The function returns the portion of the string specified by the start and end parameters.
The function returns string between $start
and $end
.
The function returns false
if $strict = true
and $start
or $end
is missing in the $string
.
For the disabled strict mode result will be:
-
source
$string
if$start
and$end
are missing in the$string
. -
source
$string
before$end
if$start
is missing in the$string
. - source
$string
after$start
if$end
is missing in the$string
.
wbetween
The function returns the portion of the string specified by the start and end parameters wrapped with those parameters.
The function returns string between $start
and $end
wrapped with $start
and $end
.
The function returns false
if $strict = true
and $start
or $end
is missing in the $string
.
For the disabled strict mode result will be:
-
source
$string
if$start
and$end
are missing in the$string
. -
source
$string
without substring after$end
if$start
is missing in the$string
. - source
$string
without substring before$start
if$end
is missing in the$string
.
utrim
The function calls trim()
function with slash (/
) and backslash (\
) added to charlist.
Testing
You can run the tests with:
Contributing
Please see CONTRIBUTING for details and a todo list.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.