Skip to content

Commit

Permalink
Added some built-in method examples to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
PHLAK committed Oct 15, 2019
1 parent 0d7863b commit 05d82ee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,21 @@ str_shuffle($string) // Returns something like 'enoipo ktnjhnr'
strlen($string); // Returns 14
```

The strength of Twine, however comes from it's built-in methods.

```php
$string->echo(); // Echos 'john pinkerton'
$string->shuffle(); // Returns something like 'enoipo ktnjhnr'
$string->length(); // Returns 14

// or some more interesting methods

$string->reverse(); // Returns 'notreknip nhoj'
$string->contains('pink'); // Returns true
$stting->replace('pink', 'purple'); // Returns 'john purpleton'
$string->snakeCase(); // Returns 'john_pinkerton'
```

At this point you're ready to start using Twine by calling any of its many
built in methods.

Expand Down

0 comments on commit 05d82ee

Please sign in to comment.