Skip to content

Commit 2488eba

Browse files
committed
add stringable method
1 parent c354a69 commit 2488eba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Illuminate/Support/Stringable.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ public function beforeLast($search)
132132
return new static(Str::beforeLast($this->value, $search));
133133
}
134134

135+
/**
136+
* Get the portion of a string between a given values.
137+
*
138+
* @param string $before
139+
* @param string $after
140+
* @return static
141+
*/
142+
public function between($before, $after)
143+
{
144+
return new static(Str::between($this->value, $before, $after));
145+
}
146+
135147
/**
136148
* Convert a value to camel case.
137149
*

0 commit comments

Comments
 (0)