Str::snake

Posted on November 25, 2016

The Str::snake function converts the given string to snake_case.

Example usage

$snake = Str::snake('fooBar');

// foo_bar

$snake
= Str::snake('LolitaFrameworkRocks');
// lolita_framework_rocks

$snake
= Str::snake('lolita framework rocks');
// lolita framework rocks

$snake = Str::snake('LolitaFrameworkRocks', '-');
// lolita-framework-rocks

Parameters

string $value

string $delimiter

Return Value

string

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *