File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -133,22 +133,20 @@ public static function beforeLast($subject, $search)
133
133
}
134
134
135
135
/**
136
- * Get the portion of a string between a given values.
136
+ * Get the portion of a string between two given values.
137
137
*
138
138
* @param string $subject
139
- * @param string $before
140
- * @param string $after
139
+ * @param string $from
140
+ * @param string $to
141
141
* @return string
142
142
*/
143
- public static function between ($ subject , $ before , $ after )
143
+ public static function between ($ subject , $ from , $ to )
144
144
{
145
- if ($ before === '' || $ after === '' ) {
145
+ if ($ from === '' || $ to === '' ) {
146
146
return $ subject ;
147
147
}
148
148
149
- $ rightCropped = static ::after ($ subject , $ before );
150
-
151
- return static ::beforeLast ($ rightCropped , $ after );
149
+ return static ::beforeLast (static ::after ($ subject , $ from ), $ to );
152
150
}
153
151
154
152
/**
Original file line number Diff line number Diff line change @@ -133,15 +133,15 @@ public function beforeLast($search)
133
133
}
134
134
135
135
/**
136
- * Get the portion of a string between a given values.
136
+ * Get the portion of a string between two given values.
137
137
*
138
- * @param string $before
139
- * @param string $after
138
+ * @param string $from
139
+ * @param string $to
140
140
* @return static
141
141
*/
142
- public function between ($ before , $ after )
142
+ public function between ($ from , $ to )
143
143
{
144
- return new static (Str::between ($ this ->value , $ before , $ after ));
144
+ return new static (Str::between ($ this ->value , $ from , $ to ));
145
145
}
146
146
147
147
/**
You can’t perform that action at this time.
0 commit comments