Skip to content

Commit

Permalink
Add options to Sentence case
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Feb 7, 2023
1 parent 0552d0c commit cad5e41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ ChangeCase::path('test string');
#### Sentence case
> Transform into a lower case with spaces between words, then capitalize the string.
💡 Support [options](#options)

```php
ChangeCase::sentence('testString');
// 'Test string'
Expand Down
4 changes: 2 additions & 2 deletions src/ChangeCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ public static function path(string $str, array $opt = []): string
* Transform into a lower case with spaces between words, then capitalize
* the string.
*/
public static function sentence(string $str): string
public static function sentence(string $str, array $opt = []): string
{
return Str::ucfirst(self::no($str));
return Str::ucfirst(self::no($str, $opt));
}

/**
Expand Down

0 comments on commit cad5e41

Please sign in to comment.