Skip to content

Commit 348c055

Browse files
committed
Updated readme
1 parent 1d1c280 commit 348c055

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

readme.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,40 @@
1-
# Type Functions
1+
# String Functions
22

3-
[![Build Status](http://img.shields.io/travis/typedphp/type-functions.svg?style=flat-square)](https://travis-ci.org/typedphp/type-functions)
4-
[![Code Quality](http://img.shields.io/scrutinizer/g/typedphp/type-functions.svg?style=flat-square)](https://scrutinizer-ci.com/g/typedphp/type-functions)
5-
[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/typedphp/type-functions.svg?style=flat-square)](http://typedphp.github.io/type-functions/master)
6-
[![Version](http://img.shields.io/packagist/v/typedphp/type-functions.svg?style=flat-square)](https://packagist.org/packages/typedphp/type-functions)
7-
[![License](http://img.shields.io/packagist/l/typedphp/type-functions.svg?style=flat-square)](licence.md)
3+
[![Build Status](http://img.shields.io/travis/typedphp/string-functions.svg?style=flat-square)](https://travis-ci.org/typedphp/string-functions)
4+
[![Code Quality](http://img.shields.io/scrutinizer/g/typedphp/string-functions.svg?style=flat-square)](https://scrutinizer-ci.com/g/typedphp/string-functions)
5+
[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/typedphp/string-functions.svg?style=flat-square)](http://typedphp.github.io/string-functions/master)
6+
[![Version](http://img.shields.io/packagist/v/typedphp/string-functions.svg?style=flat-square)](https://packagist.org/packages/typedphp/string-functions)
7+
[![License](http://img.shields.io/packagist/l/typedphp/string-functions.svg?style=flat-square)](licence.md)
88

99
## Example
1010

1111
```php
12-
use TypedPHP\Functions\TypeFunctions;
12+
use TypedPHP\Functions\StringFunctions;
1313

14-
TypeFunctions\getType(1.5); // number
15-
16-
TypeFunctions\isBoolean(false); // true
17-
TypeFunctions\isBoolean("false"); // false
14+
StringFunctions\endsWith("a long string", "string"); // true
15+
StringFunctions\replace("a long string", "long", "enormous"); // "a enormous string"
1816
```
1917

2018
Functions:
2119

22-
- `isNumber`
23-
- `isBoolean`
24-
- `isNull`
25-
- `isObject`
26-
- `isFunction`
27-
- `isExpression`
28-
- `isString`
29-
- `isResource`
30-
- `getType`
31-
32-
Caveats:
33-
34-
- `isExpression` will return false if `isString` returns true.
35-
- `isFunction` will return false if `isObject` returns true.
36-
- `getType` will return unknown if the argument is not matched by any of the `is*` functions.
20+
- `startsWith`
21+
- `endsWith`
22+
- `indexOf`
23+
- `length`
24+
- `matches`
25+
- `replace`
26+
- `slice`
27+
- `split`
3728

3829
## Installation
3930

4031
```sh
41-
❯ composer require "typedphp/type-functions:*"
32+
❯ composer require "typedphp/string-functions:*"
4233
```
4334

4435
## Testing
4536

4637
```sh
47-
❯ composer create-project "typedphp/type-functions:*" .
38+
❯ composer create-project "typedphp/string-functions:*" .
4839
❯ vendor/bin/phpunit
4940
```

0 commit comments

Comments
 (0)