Skip to content

Commit

Permalink
Add a reference to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek- committed Nov 3, 2016
1 parent 424e733 commit 48aa633
Showing 1 changed file with 65 additions and 14 deletions.
79 changes: 65 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,77 @@
Nekland Tools
=============

[![Build Status](https://travis-ci.org/Nekland/Tools.svg?branch=master)](https://travis-ci.org/Nekland/Tools)

Just some classes helping to code with PHP in general.

**This repository follows semver.**

Installation
------------

Inside your `composer.json` file:

```json
{
"require": {
"nekland/tools": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Nekland/Tools"
}
]
}
```bash
composer require "nekland/tools"
```

Then `composer update nekland/tools`.

Reference
---------

### StrinTools class

**Encoding arguments are optionals.**

#### ::camelize

```php
StringTools::camelize($str, $from) : string
```

* `$str` string input
* `$from` (optional, default "\_") string entry format (can be "-" or "\_")

#### ::startsWith

```php
StringTools::startsWith($str, $start, $encoding) : bool
```

* `$str` string input
* `$start` string it should starts with

#### ::endsWith

```php
StringTools::endsWith($str, $end, $encoding) : bool
```

* `$str` string input
* `$end` string it should ends with

#### ::removeStart

```php
StringTools::removeStart($str, $toRemove, $encoding) : string
```

* `$str` string input
* `$toRemove` string to remove at the start of `$str`

#### ::contains

```php
StringTools::contains($str, $needle, $encoding) : bool
```

* `$str` string input
* `$needle` potentially contained string

### EqualableInterface

Helps you equals on objects on a similar way as [java](http://stackoverflow.com/questions/1643067/whats-the-difference-between-equals-and).

#### equals

Method that you must implements to check if the object taking as parameter is equals or not.

0 comments on commit 48aa633

Please sign in to comment.