Skip to content

Commit

Permalink
Add doc for swapCase & Repeat, bump ver to 2.9.0 for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlam604 committed Nov 20, 2016
1 parent 9366188 commit 6ac6191
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions README.md
Expand Up @@ -81,6 +81,7 @@ Stringizer is a PHP string manipulation library with support for method chaining
* [Replace Accents](#replaceaccents)
* [Remove Non Ascii](#removeascii)
* [Remove Whitespace](#removewhitespace)
* [Repeat](#repeat)
* [Replace & Replace Case-Insensitive](#replace)
* [Reverse](#reverse)
* [SentenceCount](#sentencecount)
Expand All @@ -89,6 +90,7 @@ Stringizer is a PHP string manipulation library with support for method chaining
* [Strip Punctuation](#strippunctuation)
* [Strip Tags](#striptags)
* [Sub String](#substring)
* [SwapCase](#swapcase)
* [ToBoolean](#toboolean)
* [Trim](#trim)
* [Trim Left](#trimleft)
Expand Down Expand Up @@ -131,14 +133,14 @@ It's recommended that you use [Composer](https://getcomposer.org/) to install St
Manual install with composer

```bash
$ composer require jasonlam604/stringizer "^2.8.0"
$ composer require jasonlam604/stringizer "^2.9.0"
```

Using the composer.json file

```json
"require": {
"jasonlam604/stringizer": "^2.8.0"
"jasonlam604/stringizer": "^2.9.0"
}
```

Expand Down Expand Up @@ -849,9 +851,23 @@ $s = new Stringizer("");
$s->randomAlphanumeric(); // w5quanvlUP
```

#### repeat

Returns a string repeated n times.

```php
$s = new Stringizer("FizzöBuzz");
$s->repeat(2); // FizzöBuzzFizzöBuzz
```

```php
$s = new Stringizer("こ");
$s->repeat(5); // こここここ
```

#### replaceAccents

Replace characters with accents with the same character without accents
Replace characters with accents with the same character without accents.

```php
$s = new Stringizer("FizzöBuzz Fizz Buzz Fizz Buzzé");
Expand Down Expand Up @@ -1044,6 +1060,15 @@ $s = new Stringizer("キラキラした キラキラした");
$s->subString(7); // キラキラした
```

#### swapCase

Swap the case of each character.

```php
$s = new Stringizer("hELLO wORLD");
$s->swapCase(); // Hello World
```

#### toBoolean

Converts a logical truth string to boolean.
Expand Down

0 comments on commit 6ac6191

Please sign in to comment.