mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-09-02 09:33:10 +02:00
Add between
This commit is contained in:
11
README.md
11
README.md
@@ -18,6 +18,7 @@ s('string')->toTitleCase()->ensureRight('y') == 'Stringy'
|
||||
* [Instance methods](#instance-methods)
|
||||
* [append](#appendstring-string)
|
||||
* [at](#atint-index)
|
||||
* [between](#betweenstring-start-string-end--int-offset)
|
||||
* [camelize](#camelize)
|
||||
* [chars](#chars)
|
||||
* [collapseWhitespace](#collapsewhitespace)
|
||||
@@ -229,6 +230,16 @@ Returns the character at $index, with indexes starting at 0.
|
||||
S::create('fòô bàř')->at(6); // 'ř'
|
||||
```
|
||||
|
||||
##### between(string $start, string $end [, int $offset])
|
||||
|
||||
Returns the substring between $start and $end, if found, or an empty
|
||||
string. An optional offset may be supplied from which to begin the
|
||||
search for the start string.
|
||||
|
||||
```php
|
||||
S::create('{foo} and {bar}')->between('{', '}'); // 'foo'
|
||||
```
|
||||
|
||||
##### camelize()
|
||||
|
||||
Returns a camelCase version of the string. Trims surrounding spaces,
|
||||
|
Reference in New Issue
Block a user