You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: strings.md
+40Lines changed: 40 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
47
47
[Str::chopEnd](#method-str-chop-end)
48
48
[Str::contains](#method-str-contains)
49
49
[Str::containsAll](#method-str-contains-all)
50
+
[Str::deduplicate](#method-deduplicate)
50
51
[Str::endsWith](#method-ends-with)
51
52
[Str::excerpt](#method-excerpt)
52
53
[Str::finish](#method-str-finish)
@@ -141,6 +142,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
141
142
[chopEnd](#method-fluent-str-chop-end)
142
143
[contains](#method-fluent-str-contains)
143
144
[containsAll](#method-fluent-str-contains-all)
145
+
[deduplicate](#method-fluent-str-deduplicate)
144
146
[dirname](#method-fluent-str-dirname)
145
147
[endsWith](#method-fluent-str-ends-with)
146
148
[exactly](#method-fluent-str-exactly)
@@ -466,6 +468,25 @@ You may disable case sensitivity by setting the `ignoreCase` argument to `true`:
466
468
467
469
// true
468
470
471
+
<aname="method-deduplicate"></a>
472
+
#### `Str::deduplicate()` {.collection-method}
473
+
474
+
The `Str::deduplicate` method replaces consecutive instances of a character with a single instance of that character in the given string. By default, the method deduplicates spaces:
@@ -1744,6 +1765,25 @@ You can disable case sensitivity by setting the `ignoreCase` argument to `true`:
1744
1765
1745
1766
// true
1746
1767
1768
+
<aname="method-fluent-str-deduplicate"></a>
1769
+
#### `deduplicate` {.collection-method}
1770
+
1771
+
The `deduplicate` method replaces consecutive instances of a character with a single instance of that character in the given string. By default, the method deduplicates spaces:
0 commit comments