Skip to content

Commit

Permalink
Strings 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Apr 13, 2021
1 parent 9bf67f9 commit 7273a72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<a name="3.0.2"></a>
# [3.0.2](https://github.com/atomastic/strings) (2021-04-13)
* fix snake() method

<a name="3.0.1"></a>
# [3.0.1](https://github.com/atomastic/strings) (2021-02-19)
* fix dependencies.
Expand Down
4 changes: 2 additions & 2 deletions src/Strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@ public function snake(string $delimiter = '_'): self
if (! ctype_lower($this->string)) {
$string = preg_replace('/\s+/u', '', ucwords($this->string));
$string = static::create(preg_replace('/(.)(?=[A-Z])/u', '$1' . $delimiter, $string), $this->encoding)->lower();

$this->string = $string->toString();
}

$this->string = $string->toString();

return $this;
}

Expand Down

0 comments on commit 7273a72

Please sign in to comment.