From 260f6c0a61bd77c69e5fc4b17ea64bbf9eb29ec1 Mon Sep 17 00:00:00 2001
From: Milwad <98118400+milwad-dev@users.noreply.github.com>
Date: Fri, 4 Jul 2025 17:02:33 +0330
Subject: [PATCH 1/2] add `doesntStartWith` to strings
---
strings.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/strings.md b/strings.md
index 10fc6be5927..99cde55c355 100644
--- a/strings.md
+++ b/strings.md
@@ -48,6 +48,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
[Str::contains](#method-str-contains)
[Str::containsAll](#method-str-contains-all)
[Str::doesntContain](#method-str-doesnt-contain)
+[Str::doesntStartWith](#method-str-doesnt-start-with)
[Str::deduplicate](#method-deduplicate)
[Str::endsWith](#method-ends-with)
[Str::excerpt](#method-excerpt)
@@ -558,6 +559,23 @@ $doesntContain = Str::doesntContain('This is name', 'MY', ignoreCase: true);
// true
```
+
+#### `Str::doesntStartWith()` {.collection-method}
+
+The `Str::doesntStartWith` method determine if a given string doesn't end with a given substring:
+
+```php
+use Illuminate\Support\Str;
+
+$doesntStartWith = Str::doesntStartWith('This is name', 'day');
+
+// true
+
+$doesntStartWith = Str::doesntStartWith('This is name', 'This');
+
+// false
+```
+
#### `Str::deduplicate()` {.collection-method}
From b60906f2bb92f536e053e3648413b3ba546e4b5b Mon Sep 17 00:00:00 2001
From: Milwad <98118400+milwad-dev@users.noreply.github.com>
Date: Fri, 4 Jul 2025 17:04:27 +0330
Subject: [PATCH 2/2] add `doesntEndWith` to strings
---
strings.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/strings.md b/strings.md
index 99cde55c355..b430688d4df 100644
--- a/strings.md
+++ b/strings.md
@@ -48,6 +48,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
[Str::contains](#method-str-contains)
[Str::containsAll](#method-str-contains-all)
[Str::doesntContain](#method-str-doesnt-contain)
+[Str::doesntEndWith](#method-str-doesnt-end-with)
[Str::doesntStartWith](#method-str-doesnt-start-with)
[Str::deduplicate](#method-deduplicate)
[Str::endsWith](#method-ends-with)
@@ -559,6 +560,23 @@ $doesntContain = Str::doesntContain('This is name', 'MY', ignoreCase: true);
// true
```
+
+#### `Str::doesntEndWith()` {.collection-method}
+
+The `Str::doesntEndWith` method determine if a given string doesn't start with a given substring:
+
+```php
+use Illuminate\Support\Str;
+
+$doesntEndWith = Str::doesntEndWith('a7', 'a');
+
+// true
+
+$doesntEndWith = Str::doesntEndWith('a7', '7');
+
+// false
+```
+
#### `Str::doesntStartWith()` {.collection-method}